commit | 859db26729fc0edbcafb36675fa105eb00f9d24f | [log] [tgz] |
---|---|---|
author | Raymond Hettinger <python@rcn.com> | Wed Nov 12 15:21:20 2003 +0000 |
committer | Raymond Hettinger <python@rcn.com> | Wed Nov 12 15:21:20 2003 +0000 |
tree | 02d3cd5ecfb7c12df53a9e4dd1e3b8f6bc56bca2 | |
parent | ad983e79d6f215235d205245c2599620e33cf719 [diff] |
Improve backwards compatibility code to handle True/False.
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 @@ 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']