True/False

Erik Max Francis max at alcyone.com
Wed Apr 23 17:05:24 EDT 2003


Skip Montanaro wrote:

> What does this have to do with conditional assignment to True and
> False?

>From the context, which has been excessively discussed, it should be
obvious.  There has been a great deal of talk recently about doing the
same SyntaxWarning protection for True and False.

> Assigning to True or False today doesn't produce a SyntaxWarning, and
> given
> that it's rather common to define them in programs, it's likely that
> it
> won't for a long time.

It came out that it was decided that any such change (if ever
implemented) would be held off for a long time, but it was not clear at
the time it was discussed and the beginning of this thread, when the
topic was being addressed.

It also came out that if a SyntaxWarning were to be added for True/False
manipulations, they'd be done at parse time before anything gets
executed so the try: True; except NameError: ... trick wouldn't work
anyway.

-- 
 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/  \ If I had known, I would have become a watchmaker.
\__/ Albert Einstein
    7 Sisters Productions / http://www.7sisters.com/
 Web design for the future.




More information about the Python-list mailing list