Commit 56064226 authored by Tres Seaver's avatar Tres Seaver

'any' and 'all' are not builtins in Python 2.4.

parent 6f550166
......@@ -164,13 +164,23 @@ def f11():
f11()
def f12():
assert all([True, True, True]) == True
assert all([True, False, True]) == False
try:
all
except NameError:
pass # Python < 2.5
else:
assert all([True, True, True]) == True
assert all([True, False, True]) == False
f12()
def f13():
assert any([True, True, True]) == True
assert any([True, False, True]) == True
assert any([False, False, False]) == False
try:
all
except NameError:
pass # Python < 2.5
else:
assert any([True, True, True]) == True
assert any([True, False, True]) == True
assert any([False, False, False]) == False
f13()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment