Assign to True / False in 2.3

Just just at
Wed Jul 2 12:38:02 CEST 2003

In article <3F02ADD3.6047F561 at>,
 Erik Max Francis <max at> wrote:

> Culley Angus wrote:
> > I was a little suprised to find that I could assign a value to 'True',
> > and 'False' without warning though, and was wondering if this is
> > deliberate.
> This is true of pretty much all Python features.  The only special
> dispensation goes to None, which is a warning now (in the 2.3 beta):

Actually, at some point there was a warning for True and False as well, 
but it was taken out because there is plenty of code out there like this:

        True, False
    except NameError:
        True, False = 1, 0

(I'm not entirely sure, it can also be that there never was a warning in 
place, but it was discussed.)


More information about the Python-list mailing list