True inconsistency in Python

Terry Reedy tjreedy at udel.edu
Fri Nov 14 06:37:41 CET 2003


"Scott Chapman" <scott_list at mischko.com> wrote in message
news:mailman.694.1068696749.702.python-list at python.org...
> There seems to be an inconsistency here:

In regard to logic, the current Python implementation acts just as
specified in the manaul, which is written as intended.  This is the
only consistency relevant to Python.

In math, an inconsistent set of premises is one from which one can
derive both true and false.  Python as delivered has no such
inconsistency in that sense either.  bool(object) is either True or
False for every Python object except possibly for instances of a user
class with the appropriate special method mangled either by accident
or perverse intention.

In static math, x = x+1 is read as x == x+1, which is usually false.
But programming is not mathematics.

If you merely meant "Python is not consistent with my expectations"
then I suppose you are right.  If that really bothers you, I suspect
you know the realistic remedy ;-).

Terry J. Reedy






More information about the Python-list mailing list