Message338940
The consensus is clearly to return NotImplemented in this case, also because that's what most builtins do, like the object() example that you mentioned.
However, I would rather keep that note and change it to say return NotImplemented. It's an important difference between tp_richcompare and the 6 Python methods __eq__ and friends. Explicitly saying what do you if you only want __eq__ and __ne__ but no other operators (which is not exceptional at all) looks useful to me. |
|
Date |
User |
Action |
Args |
2019-03-27 06:35:00 | jdemeyer | set | recipients:
+ jdemeyer, rhettinger, Devin Jeanpierre, r.david.murray, docs@python |
2019-03-27 06:35:00 | jdemeyer | set | messageid: <1553668500.52.0.762895199674.issue29986@roundup.psfhosted.org> |
2019-03-27 06:35:00 | jdemeyer | link | issue29986 messages |
2019-03-27 06:35:00 | jdemeyer | create | |
|