bool behavior in Python 3000?
Ben Finney
bignose+hates-spam at benfinney.id.au
Tue Jul 10 18:47:20 EDT 2007
Michael Hoffman <cam.ac.uk at mh391.invalid> writes:
> Alan Isaac wrote:
> > Is there any discussion of having real booleans
> > in Python 3000?
>
> I'm not sure how the bools we have now are not "real."
I'm guessing that Alan is referring (at least in part) to this behaviour:
Python 2.4.4 (#2, Apr 5 2007, 20:11:18)
[...]
>>> True == 1
True
>>> False == 0
True
Whereas a real bool type would have discrete values for True and False
that would not be equal to any other.
--
\ "I guess we were all guilty, in a way. We all shot him, we all |
`\ skinned him, and we all got a complimentary bumper sticker that |
_o__) said, 'I helped skin Bob.'" -- Jack Handey |
Ben Finney
More information about the Python-list
mailing list