True inconsistency in Python

Terry Reedy tjreedy at udel.edu
Fri Nov 14 00:23:23 EST 2003


"Ben Finney" <bignose-hates-spam at and-benfinney-does-too.id.au> wrote
in message news:slrnbr69ml.ge6.bignose-hates-spam at iris.polar.local...
> This conflation of types is confusing,

but very useful

>and (like many other languages)
> Python has now "grown a Boolean type" to distinguish integer 0 and 1
> from Boolean False and True.  However, the previous behaviour is
still
> supported -- for how long, I don't know.

When bool was introduced, Guido promised that is would always remain a
subtype of int.  Crippling usefulness in the name of mathematical
purity is not on the table.

Terry J. Reedy






More information about the Python-list mailing list