<div><br></div><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br></blockquote>
</blockquote></blockquote>
But you need to have an order that will work with sorted().<br>
Its not just the order you add items to the dict. To store an<br>
arbitrary order I suspect you would need to maintain a<br>
secondary list with the keys in the order of insertion.<br>
The most reliable way to dop that would be to subclass<br>
dict. Somebody may already have done that so its worth<br>
a google...<br>
<br>
HTH,<br></blockquote></div><br><div>Alan, can you give a short snippet of what that would look like? I was trying to code out some idea of how you'd retain insertion order using another dict or a list and didn't get anywhere.</div>