bool behavior in Python 3000?

Alan Isaac aisaac at american.edu
Fri Jul 13 02:37:45 CEST 2007


> Alan Isaac skrev:
>>http://www.python.org/dev/peps/pep-0285/


Nis Jørgensen wrote:
> You forgot to quote this bit: [4)]


Actually not.  That is a different point.
Ben seems bothered by this, but not me.
I do not mind that True+1 is 2.
I won't do it, but I do not object to it
being possible.

I do not like that True+True is 2.
I do not like that bool(False-True) is True.
I do not like that True and False are assignable,
which clearly begs for bugs to pass unseen.

>>> True, False = False, True
>>> print True, False
False True

Who can like that????

I also generally agree with Steve, whose points
keep being twisted beyond recognition.

Also, tah is right about my underlying interest
in arrays of bools (and more specifically,
boolean matrices).

I think Python 3000 is the right time to reconsider
the "ideal world" that Guido mentions in PEP 285.

Cheers,
Alan Isaac



More information about the Python-list mailing list