Python 2.3 True = False

Greg Ewing (using news.cis.dfn.de) me at privacy.net
Mon Mar 24 18:08:57 EST 2003


Rene Pijlman wrote:
> Martin v. Löwis:
> 
>>At one point, there was a patch to restrict assignments to True and False
>>for 2.3. This patch wasn't implemented as too much code actually did
>>assign to True and False.
> 
> You have got to be kidding :-D
> 
> What did it assign True and False to? And why?

Apparently it was fairly common for people to define their
own True and False before they became builtins. And it's
still useful to do this so your code will work on earlier
Pythons.

-- 
Greg Ewing, Computer Science Dept,
University of Canterbury,	
Christchurch, New Zealand
http://www.cosc.canterbury.ac.nz/~greg





More information about the Python-list mailing list