[issue43300] "bisect" module should support reverse-sorted sequences
Raymond Hettinger
report at bugs.python.org
Mon Feb 22 14:56:37 EST 2021
Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:
I prefer option 5 and leaving the module as-is. The bisect module api is slice oriented and, in general, people have a hard time reasoning about slices for reverse ordered sequences. Even the forward ordered API is a bit awkward so that we had to document how to implement find_lt(), find_le(), etc. because it wasn't obvious how to do so. Also, it doesn't seem to come-up much (the bisect module is over two decades old). So, I don't think the API and the internals should be gummed up for this.
My vote is -1 because it would cause more problems than it would solve. Let's cater to the common use cases rather than every possible variant.
----------
nosy: +rhettinger
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43300>
_______________________________________
More information about the Python-bugs-list
mailing list