summaryrefslogtreecommitdiff
path: root/compat.py
diff options
context:
space:
mode:
authorAdrien Di Mascio <Adrien.DiMascio@logilab.fr>2006-06-20 11:23:13 +0200
committerAdrien Di Mascio <Adrien.DiMascio@logilab.fr>2006-06-20 11:23:13 +0200
commit40e199cca5404c24cdb1fff8e00d0d04c85c79bd (patch)
tree322b88f4930622331a7c0315dfcc27d2ac2b641e /compat.py
parentaafd84cd45312cd197afcb01ac4d605d52d1209f (diff)
downloadlogilab-common-40e199cca5404c24cdb1fff8e00d0d04c85c79bd.tar.gz
don't need to cast elements to bool
Diffstat (limited to 'compat.py')
-rw-r--r--compat.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/compat.py b/compat.py
index 4a34e38..a9aca15 100644
--- a/compat.py
+++ b/compat.py
@@ -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