diff options
author | Adrien Di Mascio <Adrien.DiMascio@logilab.fr> | 2006-06-20 11:23:13 +0200 |
---|---|---|
committer | Adrien Di Mascio <Adrien.DiMascio@logilab.fr> | 2006-06-20 11:23:13 +0200 |
commit | 40e199cca5404c24cdb1fff8e00d0d04c85c79bd (patch) | |
tree | 322b88f4930622331a7c0315dfcc27d2ac2b641e /compat.py | |
parent | aafd84cd45312cd197afcb01ac4d605d52d1209f (diff) | |
download | logilab-common-40e199cca5404c24cdb1fff8e00d0d04c85c79bd.tar.gz |
don't need to cast elements to bool
Diffstat (limited to 'compat.py')
-rw-r--r-- | compat.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -200,7 +200,7 @@ except NameError: Return True if bool(x) is True for any x in the iterable. """ for elt in iterable: - if bool(elt): + if elt: return True return False @@ -210,6 +210,6 @@ except NameError: Return True if bool(x) is True for all values x in the iterable. """ for elt in iterable: - if not bool(elt): + if not elt: return False return True |