True, False, None

Mel Wilson mwilson at the-wire.com
Mon Nov 10 15:51:32 EST 2003


In article <boop38$c2l$1 at news.island.liu.se>,
Thomas Bellman <bellman at lysator.liu.se> wrote:
>Alex Martelli <aleax at aleax.it> wrote:
>
>> True, False and None may well become keywords in the future, because that
>> might make things "even finer" in some respects.  E.g., right now,
>>     while True:
>>         ...
>> has to look-up 'True' at EACH step just in case the ... code rebinds
>> that name.  This _is_ a bit silly, when there is no real use-case for
>> "letting True be re-bound".  Nothing major, but...:
>
>That's a silly reason to make them keywords.  A much better way
>to achieve the same goal would be to make the optimizer recognize
>that True isn't re-bound within the loop.

   Often you can't tell.  Any loop that includes a function
call could do anything, determined by events that occur long
after the optimizer terminates.  And many things can invoke
function calls..  __add__, anyone?

        Regards.        Mel.




More information about the Python-list mailing list