]> 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:57 +0000 (15:21 +0000)
committerRaymond Hettinger <python@rcn.com>
Wed, 12 Nov 2003 15:21:57 +0000 (15:21 +0000)
Lib/sets.py

index 04b56e2fcd6a31b28d1b853608f9c5f503e94589..8ec7e2fa8c50ec94929154b52656fd1a06556051 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']