New submission from John Belmonte <j...@neggie.net>:

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 offers 
O(1) popleft(), insort() performance with deque is not acceptable.

Lack of descending support in bisect necessitates workarounds such as using 
negative-valued items, which hurts code readability and moreover assumes that 
values are numbers.

----------
components: Library (Lib)
messages: 341921
nosy: John Belmonte
priority: normal
severity: normal
status: open
title: bisect should support descending order
type: enhancement

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue36857>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to