<div class="gmail_quote">On Wed, May 16, 2012 at 5:38 AM, Jean-Daniel <span dir="ltr"><<a href="mailto:jeandaniel.browne@gmail.com" target="_blank">jeandaniel.browne@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Sun, May 13, 2012 at 2:29 PM, Alec Taylor <<a href="mailto:alec.taylor6@gmail.com">alec.taylor6@gmail.com</a>> wrote:<br>
> There is an ordered dict type since Python 3.1[1] and Python 2.7.3[2].<br>
<br>
</div>Ordered dict are useful, but they only remember the ordered in which<br>
they were added, you can not order them a on key.<br></blockquote><div><br></div><div>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.</div>
<div><br></div><div>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.</div><div><br></div><div>More information:</div><div><a href="http://pypi.python.org/pypi/blist">http://pypi.python.org/pypi/blist</a></div>
<div><a href="http://stutzbachenterprises.com/blist/">http://stutzbachenterprises.com/blist/</a></div><div><br></div></div>-- <br>Daniel Stutzbach<br>