True == 1 weirdness

Gregory Ewing greg.ewing at canterbury.ac.nz
Sat Sep 19 09:19:33 CEST 2015


Random832 wrote:
> I'm disputing that chained comparisons are used for the particular
> combinations that I am actually arguing should not be used in python.
> Such as a < b > c or a != b != c  [whereas a may or may not be equal to
> c]

I can't remember offhand seeing a != b != c written by a
mathematician, but if I did, I would suspect that he
*intended* it to imply a != c, even if that's not a strict
logical consequence of the notation.

-- 
Greg


More information about the Python-list mailing list