Booleans (was Re: My .02 on PEP308 + an extra question)

Magnus Lie Hetland mlh at
Sun Mar 2 16:03:42 CET 2003

In article <yu99isv1vo0n.fsf at>, Andrew Koenig wrote:
>In particular, despite the disadvantages of allowing implicit
>conversions to and from bool, the type has two substantial advantages:
>        1) You don't have to worry about combining libraries that
>           use different conventions for representing boolean types.
>        2) You can overload based on it.
>These two advantages -- particularly the first -- were deemed to be
>sufficient by themselves to justify introducing a new type.

How are these advantages related to Python, if at all? Certainly the
second is not, unless you are using type checking (which you rarely
should). Maybe the first is relevant -- I can't see exactly how...

I realize that you were talking about C++ -- I'm just curious :)

Magnus Lie Hetland               "Nothing shocks me. I'm a scientist."                                   -- Indiana Jones

More information about the Python-list mailing list