Changing truth

A. Lloyd Flanagan alloydflanagan at attbi.com
Thu Jan 16 10:33:46 EST 2003


Christian Tismer <tismer at tismer.com> wrote in message news:<mailman.1042714955.32205.python-list at python.org>...

> What I think is that None, False and True have the
> drawback that they are names, which can be changed.
> I would like to make them like literals.
> Nobody can try to write
> 

Actually I believe the intention is to eventually make them keywords
for that reason.  In Python 2.3a1 I get:
>>> None = 4
<stdin>:1: SyntaxWarning: assigment to None

I suspect they're planning to phase in the change to None to avoid
breaking old (bad) code, and I suspect a lot of code says something
like
True = 0
False = 1
so it may take a while to make them keywords.

By the way, am I the only one who noticed the spelling error in the
SyntaxWarning message above?  Somebody should fix that...




More information about the Python-list mailing list