On 13 May 2012 13:29, Alec Taylor <alec.tayl...@gmail.com> wrote: > There is an ordered dict type since Python 3.1[1] and Python 2.7.3[2].
I don't think that'll help the OP. Python's OrderedDict keeps track of the order in which the keys were inserted into the dictionary (a bit like a list), it doesn't keep the keys sorted. > If you are looking for the best possible self-sorting structure for > searching, then perhaps you are looking for what's outlined in the > 2002 article by Han & Thorup: Integer Sorting in O(n sqrt(log log n)) > Expected Time and Linear Space[3]. I can't access it but it seems to me it's not about self sorted data structures, which is what the OP is looking for. -- Arnaud -- http://mail.python.org/mailman/listinfo/python-list