DanielStutzbach / blist

A list-like type with better asymptotic performance and similar performance on small lists
Other
310 stars 36 forks source link

sortedset should support deleting by index or range of indexes #14

Closed DanielStutzbach closed 14 years ago

mikegraham commented 14 years ago

http://github.com/mikegraham/blist/commit/38a9ef757e02528d8da39d729ff80604be49a7e6 should fix this.

>>> s = blist.sortedset(range(10))
>>> s
sortedset([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
>>> del s[3]
>>> s
sortedset([0, 1, 2, 4, 5, 6, 7, 8, 9])
>>> del s[::2]
>>> s
sortedset([1, 4, 6, 8])