[Python-Dev] For review: PEP 285: Adding a bool type (original) (raw)

Samuele Pedroni pedroni@inf.ethz.ch
Sat, 9 Mar 2002 18:43:35 +0100


Hi. [after contemplation of scheme, CL, and Python]

That's not terribly bad. But I'm not sure I'm ready to answer the complaints from newbies who are confused by this: >>> isinstance(1, int) True >>> print isinstance(1, int) 1 >>>

My 2cts. IMHO an explicit bool type add cognitive burden, does not subtract from there, especially given that Python should preserve its truth semantics rules.

The only win is that we have a blessed return type for predicates, which is just an ideal win
as long as there is code around that does not stick with the new convention. Ant the cometics.

A more clear win is RPC (but so late in the game it seems people have dealt with that otherwise).

So it seems it is a matter of BDFL's taste :). By the way the proposal open new style questions: E.g. Should one write:

[A] def f(arg,optflag=0):

f(...,1)

Or

[B] def f(arg,optflag=False):

f(...,True).

Guido is up to your taste :).

regards, Samuele Pedroni.