This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author maggyero
Recipients maggyero, rhettinger
Date 2020-03-13.08:08:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1584086927.7.0.949918844598.issue39862@roundup.psfhosted.org>
In-reply-to
Content
More precisely:

The following relationships are always valid and therefore implemented by default in Python (_except for the union relationships, which seems arbitrary and is the reason of this Python issue_):

- 2 [complementary](https://en.wikipedia.org/wiki/Binary_relation#Complement) relationships: "= and ≠ are each other’s complement";
- 6 [converse](https://en.wikipedia.org/wiki/Binary_relation#Converse) relationships*: "= is the converse of itself", "≠ is the converse of itself", "< and > are each other’s converse", and "≤ and ≥ are each other’s converse";
- 2 [union](https://en.wikipedia.org/wiki/Binary_relation#Union) relationships: "≤ is the union < and =" and "≥ is the union of > and ≤".

The following relationships are only valid for [total orders](https://en.wikipedia.org/wiki/Binary_relation#Properties) and therefore not implemented by default in Python (but users can conveniently implement them when they are valid with the [`functools.total_ordering`](https://docs.python.org/3/library/functools.html#functools.total_ordering) class decorator provided by the Python standard library):

- 4 [complementary](https://en.wikipedia.org/wiki/Binary_relation#Complement) relationships: "< and ≥ are each other’s complement" and "> and ≤ are each other’s complement".

----

\* Converse relationships are implemented in Python through the [`NotImplemented` protocol](https://docs.python.org/3/reference/datamodel.html#the-standard-type-hierarchy).
History
Date User Action Args
2020-03-13 08:08:47maggyerosetrecipients: + maggyero, rhettinger
2020-03-13 08:08:47maggyerosetmessageid: <1584086927.7.0.949918844598.issue39862@roundup.psfhosted.org>
2020-03-13 08:08:47maggyerolinkissue39862 messages
2020-03-13 08:08:47maggyerocreate