From: Raymond Hettinger Date: Wed, 12 Nov 2003 15:21:57 +0000 (+0000) Subject: Improve backwards compatibility code to handle True/False. X-Git-Tag: v2.3.3c1~66 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a6794eaaeeef558ca272612ba83502acd6d31e17;p=thirdparty%2FPython%2Fcpython.git Improve backwards compatibility code to handle True/False. --- diff --git a/Lib/sets.py b/Lib/sets.py index 04b56e2fcd6a..8ec7e2fa8c50 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']