Changing truth

Christian Tismer tismer at tismer.com
Thu Jan 16 06:08:34 EST 2003


Michael Hudson wrote:
> Christian Tismer <tismer at tismer.com> writes:
...

>>>>>bool(True == True)
>>
>>False
> 
> Now *that* I don't understand.

You are right. I didn't have Py 2.3 at hand
and was misleading myself.

>># ouch! Let's make these invulnerable, ASAP,
>># and None, too
> 
> 
> Hey, noone in this thread's even tried to fiddle with the builtins
> yet...

Right, the swaps were done via __main__, and even
if done in __builtins__, the above would have given
True.

What I think is that None, False and True have the
drawback that they are names, which can be changed.
I would like to make them like literals.
Nobody can try to write

1 = 42

-- 
Christian Tismer             :^)   <mailto:tismer at tismer.com>
Mission Impossible 5oftware  :     Have a break! Take a ride on Python's
Johannes-Niemeyer-Weg 9a     :    *Starship* http://starship.python.net/
14109 Berlin                 :     PGP key -> http://wwwkeys.pgp.net/
work +49 30 89 09 53 34  home +49 30 802 86 56  pager +49 173 24 18 776
PGP 0x57F3BF04       9064 F4E1 D754 C2FF 1619  305B C09C 5A3B 57F3 BF04
      whom do you want to sponsor today?   http://www.stackless.com/






More information about the Python-list mailing list