Tim Peters <t...@python.org> added the comment:
So as far as possible, CPython only uses __lt__ ("<") element comparisons for its order-sensitive algorithms. This is documented for list.sort(), but the bisect and heapq modules strive to do the same. The point is to minimize the number of comparison methods a new type needs to implement to participate (and "just one: __lt__" is ideal). Your change would require they implement "__le__" too, so is unlikely to be accepted for CPython. ---------- assignee: rhettinger -> nosy: +tim.peters -rhettinger _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue38626> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com