[Python-Dev] Re: PEP 285: Adding a bool type
Erik Max Francis
max at alcyone.com
Wed Apr 3 14:40:22 EST 2002
Fredrik Lundh wrote:
> (Python docs tend to use "true" to mean anything which isn't "false",
> and
> where operator.truth returns the right thing. this won't change
> post-PEP
> -- if you start interpreting "return true" as "return True", you'll be
> asking
> for trouble)
But these functions return Boolean values but do not guarantee that they
will be 0 or 1, just something which evaluates as the appropriate truth
value. So the 0 and 1 is not "more than just a convention"; even
standard libraries don't guarantee their usage.
--
Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
__ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/ \ Nationalism is an infantile sickness.
\__/ Albert Einstein
Alcyone Systems' Daily Planet / http://www.alcyone.com/planet.html
A new, virtual planet, every day.
More information about the Python-list
mailing list