> Dan Bishop wrote:
> >>Out of pure curiousity,
> >>Why wasn't 'While True' optimized also?
> >
> >
> > Probably has something to do with "True" and "False" not being
> > constants.

[Nick Coghlan]
> Yup. Even 'None' only just became a constant in 2.4.
>
> I don't know if 'True' and 'False' are in line for similar treatment (there
are
> obvious backwards compatibility issues in doing so).

It is unlike to before Py3.0.  Making them constants would break the reams of
compatability code:  True, False = (1==1), (1!=1).


Raymond Hettinger


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to