Booleans (was Re: My .02 on PEP308 + an extra question)
ark at research.att.com
Sun Mar 2 23:45:32 CET 2003
Magnus> How are these advantages related to Python, if at all?
Magnus> Certainly the second is not, unless you are using type
Magnus> checking (which you rarely should). Maybe the first is
Magnus> relevant -- I can't see exactly how...
Magnus> I realize that you were talking about C++ -- I'm just curious
If I remember right, part of the motivation for bool in Python was that
people were rolling their own in diverse ways.
Also, although Python doesn't overload functions based on types,
I can still imagine contexts in which it would be useful for the
default output format for Boolean values to be something other than
"1" or "0".
Andrew Koenig, ark at research.att.com, http://www.research.att.com/info/ark
More information about the Python-list