]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Improve backwards compatibility code to handle True/False.
authorRaymond Hettinger <python@rcn.com>
Wed, 12 Nov 2003 15:21:20 +0000 (15:21 +0000)
committerRaymond Hettinger <python@rcn.com>
Wed, 12 Nov 2003 15:21:20 +0000 (15:21 +0000)
Lib/sets.py

index 6fea65fc5933993499f13d5ca5221db5e298b9c2..6e09005ebb25f6ca0196d481a9bd021714fbe69d 100644 (file)
@@ -73,6 +73,10 @@ except ImportError:
         for x in iterable:
             if not predicate(x):
                 yield x
+    try:
+        True, False
+    except NameError:
+        True, False = (0==0, 0!=0)
 
 __all__ = ['BaseSet', 'Set', 'ImmutableSet']