Proposal to add a key field to the bisect library

Hi, I would like to propose an improvement to the functions in the bisect library, to add a 'key' parameter, similar to 'sorted' or other system functions. -- Chibici Tiberiu

On Sun, Nov 04, 2018 at 02:20:31PM +0200, Tiberiu Chibici wrote:
Quoting the bug tracker: This request has come up repeatedly (and been rejected) in the past. See issues 2954, 3374, 1185383, 1462228, 1451588, 1619060. https://bugs.python.org/issue4356 Unless you have something new to add, something people have missed, I don't think this idea is going to go anywhere. -- Steve

On Mon, Nov 05, 2018 at 12:19:49AM +1100, Steven D'Aprano wrote:
Actually, reading further along, it looks like there has been concensus that bisect ought to get a key function. Guido said: "Bingo. That clinches it. We need to add key=." also: "PS. It should also be added to heapq." and Raymond said: "I'll add a key= variant for Python 3.6." Obviously this didn't happen, but it might happen for 3.8. -- Steve

On Sun, Nov 04, 2018 at 02:20:31PM +0200, Tiberiu Chibici wrote:
Quoting the bug tracker: This request has come up repeatedly (and been rejected) in the past. See issues 2954, 3374, 1185383, 1462228, 1451588, 1619060. https://bugs.python.org/issue4356 Unless you have something new to add, something people have missed, I don't think this idea is going to go anywhere. -- Steve

On Mon, Nov 05, 2018 at 12:19:49AM +1100, Steven D'Aprano wrote:
Actually, reading further along, it looks like there has been concensus that bisect ought to get a key function. Guido said: "Bingo. That clinches it. We need to add key=." also: "PS. It should also be added to heapq." and Raymond said: "I'll add a key= variant for Python 3.6." Obviously this didn't happen, but it might happen for 3.8. -- Steve
participants (3)
-
Anders Hovmöller
-
Steven D'Aprano
-
Tiberiu Chibici