PEP 285: Adding a bool type
Raymond Hettinger
python at rcn.com
Sun Mar 31 19:48:22 EST 2002
"Guido van Rossum" <guido at python.org> wrote in message
news:mailman.1017466974.6751.python-list at python.org...
> I offer the following PEP for review by the community. If it receives
> a favorable response, it will be implemented in Python 2.3.
Bono's six hats:
Python author hat: Votes -1 because all the books which have a section, a
quick intro to python, will have to add another couple of paragraphs
introducing the new type and differentiating it from ints. The extra
paragraphs clutter the concept space.
Python helper/tutor hat: Votes -1 because it will need a FAQ entry to
explain the rationale and provide examples of how to interchange it with int
types. More than one question will come across the help desk.
Python YAGNI hat: Votes -1 because scans of previously my written code do
not show any need for the bool.
Python vs other languages hat: Votes -1 because this concept would make
more sense in strongly typed languages. In contrast, Python offers easy
substitutability (dictionaries where shelves were used; stringio where files
were used, etc.) -- the many faces of truth and falsehood that now exist
should be kept.
Python accountant: Where is the income stream? What can be done after the
capital expenditure that couldn't be done before?
Python gambler: Sure, why not, how many backward incompatibilities and
unexpected consequences could there be? With the potential payoff so high,
you have to go for it! <wink>
Raymond Hettinger, CPA
? Would implicit 'return Nones' at the end of function definitions be
interpreted as False
? Would the 'and' and 'or' operators now require boolean arguments
More information about the Python-list
mailing list