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

Fred L. Drake, Jr. fdrake@acm.org
Wed, 3 Apr 2002 13:27:46 -0500

Andrew Koenig writes:
 > The very first page I visited was the description of gc, the
 > garbage collector interface.  The first function that returns
 > a truth value there is described as
 >         isenabled()
 >             Returns true if automatic collection is enabled.

I spent a bit of time talking to Guido about the effect of PEP 285 on
the documentation.  My own preference is to do the same as the
examples you cite: use the English words "true" and "false", and not
give concrete typed values.

Guido would rather *not* have it this way, but rather document the
exact concrete return values.  He'd have me refer to "True" and
"False" in the same way we refer to "None", and refer to the return
type as "bool" (if indeed we're using the new bool type), or, if 1 and
0 are the return values, document them specifically as well.

For function arguments, he'd like to see truth values described as
Boolean, and the values would be the English "true" and "false".
Translations would be able to translate the English words, but not the
True and False values, which are language constants (as constant as
built-ins are).

Guido & I may clash over this a few times.  ;-(


Fred L. Drake, Jr.  <fdrake at acm.org>
PythonLabs at Zope Corporation