bool behavior in Python 3000?

Paul Rubin http
Thu Jul 12 03:49:16 CEST 2007


Steve Holden <steve at holdenweb.com> writes:
> > | I think that the assignability to the names 'True' and 'False' is
> > | incorrect, or at the very least subject to all sorts of odd results.
> > It is necessary for 2.x to not break older code.  I believe they
> > will somehow be reserved, like None, in 3.0.
> >
> But of course None was assignable until (?) 2.3 and then became
> formally constant, so it was no longer possible to assign to it or
> even shadow it in a local namespace. So much for that kind of backward
> compatibility!

None was present in the language for a long time before 2.3 though,
and any code that actually assigned to it was asking for trouble.
True and False didn't exist til recently and it was common for
programs to define them.



More information about the Python-list mailing list