Devin Jeanpierre added the comment: Sorry, forgot to link to docs because I was copy-pasting from the PR:
https://docs.python.org/2/c-api/typeobj.html#c.PyTypeObject.tp_richcompare https://docs.python.org/3/c-api/typeobj.html#c.PyTypeObject.tp_richcompare > Note: If you want to implement a type for which only a limited set of > comparisons makes sense (e.g. == and !=, but not < and friends), directly > raise TypeError in the rich comparison function. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29986> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com