[issue36857] bisect should support descending order

2019-05-08 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: If issue4356 is accepted, I think it may be possible to use `key=lambda e: -e`. -- nosy: +remi.lapeyre ___ Python tracker ___ __

[issue36857] bisect should support descending order

2019-05-08 Thread Raymond Hettinger
Raymond Hettinger added the comment: Sorry, I don't think this is a worthwhile API extension. The bisect module is primarily about searching for cut points between ranges. For your use case, consider using blist or one of the many ordered collection recipes on PyPI (for example: http://www

[issue36857] bisect should support descending order

2019-05-08 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue36857] bisect should support descending order

2019-05-08 Thread John Belmonte
New submission from John Belmonte : because "list.pop()" use case: maintain large ordered list and efficiently remove min item list.pop() is O(1) but yields the max item. There is no efficient removal of the min item. list is by far the fastest collection to use with insort(). While deque