Commit 56064226 authored by Tres Seaver's avatar Tres Seaver

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

parent 6f550166
...@@ -164,11 +164,21 @@ def f11(): ...@@ -164,11 +164,21 @@ def f11():
f11() f11()
def f12(): def f12():
try:
all
except NameError:
pass # Python < 2.5
else:
assert all([True, True, True]) == True assert all([True, True, True]) == True
assert all([True, False, True]) == False assert all([True, False, True]) == False
f12() f12()
def f13(): def f13():
try:
all
except NameError:
pass # Python < 2.5
else:
assert any([True, True, True]) == True assert any([True, True, True]) == True
assert any([True, False, True]) == True assert any([True, False, True]) == True
assert any([False, False, False]) == False assert any([False, False, False]) == False
......
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