bool behavior in Python 3000?
bignose+hates-spam at benfinney.id.au
Wed Jul 11 00:47:20 CEST 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
>>> False == 0
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 |
More information about the Python-list