[Python-Dev] Re: PEP 285: Adding a bool type

Andrew Koenig ark at research.att.com
Wed Apr 3 14:20:19 EST 2002


Fredrik> looks pretty consistent to me ;-)

It may look that way, but if the documentation is to be believed,
it's just happenstance.

Fredrik> (Python docs tend to use "true" to mean anything which isn't
Fredrik> "false", and where operator.truth returns the right thing.
Fredrik> this won't change post-PEP -- if you start interpreting
Fredrik> "return true" as "return True", you'll be asking for trouble)

Indeed.  In other words, the library does not have a consistent
convention for what values to return for answers to yes/no questions.
A particular implementation may happen to follow such a convention,
but it is under no obligation to do so.

-- 
Andrew Koenig, ark at research.att.com, http://www.research.att.com/info/ark





More information about the Python-list mailing list