Python 2.3 True = False

Dan Bishop danb_83 at yahoo.com
Mon Mar 24 16:53:06 EST 2003


Rene Pijlman <reply.in at the.newsgroup> wrote in message news:<ftnu7vk6dppcsgs2cat6u9udd96bielfgu at 4ax.com>...
> 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?

I've written some code that makes assignments to True and False.  Namely,

True = 0 == 0
False = not True

This makes True and False have type bool in Python 2.3 and int in Python 2.2.




More information about the Python-list mailing list