summaryrefslogtreecommitdiffstats
path: root/Lib/sets.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2003-11-12 15:21:20 (GMT)
committerRaymond Hettinger <python@rcn.com>2003-11-12 15:21:20 (GMT)
commit859db26729fc0edbcafb36675fa105eb00f9d24f (patch)
tree02d3cd5ecfb7c12df53a9e4dd1e3b8f6bc56bca2 /Lib/sets.py
parentad983e79d6f215235d205245c2599620e33cf719 (diff)
downloadcpython-859db26729fc0edbcafb36675fa105eb00f9d24f.zip
cpython-859db26729fc0edbcafb36675fa105eb00f9d24f.tar.gz
cpython-859db26729fc0edbcafb36675fa105eb00f9d24f.tar.bz2
Improve backwards compatibility code to handle True/False.
Diffstat (limited to 'Lib/sets.py')
-rw-r--r--Lib/sets.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/sets.py b/Lib/sets.py
index 6fea65f..6e09005 100644
--- a/Lib/sets.py
+++ b/Lib/sets.py
@@ -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']