On Wed, May 16, 2012 at 5:38 AM, Jean-Daniel <jeandaniel.bro...@gmail.com>wrote:
> On Sun, May 13, 2012 at 2:29 PM, Alec Taylor <alec.tayl...@gmail.com> > wrote: > > There is an ordered dict type since Python 3.1[1] and Python 2.7.3[2]. > > Ordered dict are useful, but they only remember the ordered in which > they were added, you can not order them a on key. > For what it's worth, my blist package (mentioned earlier in the thread) also provides sortedlist and sorteddict classes which efficiently keep items in sorted order. I don't think those are enough on their own to create a efficient solution, but they might be useful parts of an efficient solution. More information: http://pypi.python.org/pypi/blist http://stutzbachenterprises.com/blist/ -- Daniel Stutzbach
-- http://mail.python.org/mailman/listinfo/python-list