[Checkins] SVN: Zope/trunk/lib/python/AccessControl/tests/actual_python.py 'any' and 'all' are not builtins in Python 2.4.
Zvezdan Petkovic
zvezdan at zope.com
Mon Oct 27 15:17:14 EDT 2008
Is this a typo?
On Oct 27, 2008, at 1:57 PM, Tres Seaver wrote:
> def f13():
> - assert any([True, True, True]) == True
> - assert any([True, False, True]) == True
> - assert any([False, False, False]) == False
> + try:
> + all
I thinks this should be "any" instead of "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()
Arguably, if there's an "all", there will be "any", so it will work
the same, but looks a little strange to try for "all" and then use
"any" in assertion.
Best regards,
Zvezdan
More information about the Checkins
mailing list