diff options
author | Raymond Hettinger <python@rcn.com> | 2003-11-12 15:21:20 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2003-11-12 15:21:20 (GMT) |
commit | 859db26729fc0edbcafb36675fa105eb00f9d24f (patch) | |
tree | 02d3cd5ecfb7c12df53a9e4dd1e3b8f6bc56bca2 /Lib | |
parent | ad983e79d6f215235d205245c2599620e33cf719 (diff) | |
download | cpython-859db26729fc0edbcafb36675fa105eb00f9d24f.zip cpython-859db26729fc0edbcafb36675fa105eb00f9d24f.tar.gz cpython-859db26729fc0edbcafb36675fa105eb00f9d24f.tar.bz2 |
Improve backwards compatibility code to handle True/False.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/sets.py | 4 |
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'] |