Géry <gery.o...@gmail.com> added the comment:

Note that other relationships are always valid _and already implemented by 
default in the interpreter (through the `NotImplemented` return value 
protocol)_: = is the 
[converse](https://en.wikipedia.org/wiki/Binary_relation#Converse) of itself, ≠ 
is the converse of itself, < and > are each other’s converse, ≤ and ≥ as each 
other’s converse. ("converse" is loosely called "reflected" in the Python 
documentation.)

Which also makes me think that the last sentence of this documentation 
paragraph is incorrect:

> By default, `__ne__()` delegates to `__eq__()` and inverts the result
> unless it is `NotImplemented`. There are no other implied
> relationships among the comparison operators, for example, the truth
> of `(x<y or x==y)` does not imply `x<=y`.

since there _are_ other implied relationships besides ≠ is the complement of =: 
= is the converse of itself, ≠ is the converse of itself, < and > are each 
other’s converse, and ≤ and ≥ are each other’s converse.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue39862>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to