missing 'xor' Boolean operator
greg
greg at cosc.canterbury.ac.nz
Sun Jul 26 21:12:26 EDT 2009
Terry Reedy wrote:
> In Math and Python, a<b<c means a<b and b<c, not (a<b)<c or a<(b<c).
> != is a comparison operator like <,
Although Python extends the chaining principle to
!=, this is somewhat questionable, because
a < b and b < c implies a < c, but a != b and
b != c does not imply a != c.
I'm not sure I've ever seen a mathematician
write a != b != c, but if I did, I would tend
to think he meant to say that none of a, b,
c are equal to any other. That's not what it
means in Python, though.
--
Greg
More information about the Python-list
mailing list