[Checkins] SVN:	Zope/trunk/lib/python/AccessControl/tests/actual_python.py	'any' and 'all' are not builtins in Python 2.4.
    Tres Seaver 
    tseaver at palladion.com
       
    Mon Oct 27 13:57:33 EDT 2008
    
    
  
Log message for revision 92621:
  'any' and 'all' are not builtins in Python 2.4.
Changed:
  U   Zope/trunk/lib/python/AccessControl/tests/actual_python.py
-=-
Modified: Zope/trunk/lib/python/AccessControl/tests/actual_python.py
===================================================================
--- Zope/trunk/lib/python/AccessControl/tests/actual_python.py	2008-10-27 17:55:50 UTC (rev 92620)
+++ Zope/trunk/lib/python/AccessControl/tests/actual_python.py	2008-10-27 17:57:32 UTC (rev 92621)
@@ -164,13 +164,23 @@
 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()
 
    
    
More information about the Checkins
mailing list