Issue 13905: Built-in Types Comparisons should mention rich comparison methods (original) (raw)
In 2.7 the Comparisons section of stdtypes.rst only talks about cmp and never mentions the rich comparison methods: "Instances of a class normally compare as non-equal unless the class defines the cmp() method. Refer to Basic customization) for information on the use of this method to effect object comparisons."
The first sentence is false, instances can also compare as equal if they define eq. And since cmp is gone in Python3, I think the rich comparison methods should at least be mentioned, or even emphasized over cmp to help people write more forward compatible code.