Message364050
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. |
|
Date |
User |
Action |
Args |
2020-03-12 21:24:09 | maggyero | set | recipients:
+ maggyero, rhettinger |
2020-03-12 21:24:09 | maggyero | set | messageid: <1584048249.95.0.295824873039.issue39862@roundup.psfhosted.org> |
2020-03-12 21:24:09 | maggyero | link | issue39862 messages |
2020-03-12 21:24:09 | maggyero | create | |
|