Loop until condition is true

Magnus Lycka lycka at carmen.se
Tue Jun 21 10:49:07 EDT 2005


Konstantin Veretennicov wrote:
> On 6/21/05, Magnus Lycka <lycka at carmen.se> wrote:
> 
>>I don't know anything about the Python compiler internals,
>>but it doesn't seem very hard to identify simple literals following
>>while and if, and to skip the runtime test. (Perhaps it's done
>>already?)
> 
> 
> True doesn't seem to be a literal, it is looked up by name and can be
> rebound to, say, 0 anytime:

Right. Silly me. Maybe in some future Python version, True and False
will be constants, like None is since Python 2.4.



More information about the Python-list mailing list