PEP 285: Adding a bool type
Alexis Layton
alexis.layton at post.harvard.edu
Mon Apr 1 13:46:02 EST 2002
I am generally in favor of PEP 285: Adding a bool type.
Like most, I believe the capitalized versions of the truth values
"True" and "False" should be used.
I believe str(True) should not be "1", but rather "True" or whatever
other localization should be in effect once python is properly
internationalized... (<wink>?)
repr(True) should always be "True".
As for int-compatibility, were we designing Python from the ground up
it might be the case that it should be designed as a pure truth type.
But we are constrained by Pythons 1-2.2.x so True has to be
truly-comparable to 1.
--
Alexis Layton
alexis.layton at post.harvard.edu
More information about the Python-list
mailing list