DanielStutzbach / blist

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

Add weakkeysorteddict, weakvaluesorteddict, weakkeyordereddict, weakvalueordereddict, and weakorderedset #35

Closed NeilGirdhar closed 9 years ago

NeilGirdhar commented 12 years ago

First of all, blist is amazing. It has saved me a lot of time.

There are still something classes that are not implemented, for example weakkeyordereddict: like sorteddict, but instead of taking a key parameter, it uses the insertion order to come up with the order.

Feel free to use my code if it helps with implementing the "ordered" data structures: (It would be amazing to have this internally within blist) http://stackoverflow.com/questions/7828444/indexable-weak-ordered-set-in-python

If this happens (I will be ecstatic) and it might also be worth exposing all of blist's dictionaries under one factory class as in: http://stackoverflow.com/questions/6602816/why-arent-python-dicts-unified