>>>> But you need to have an order that will work with sorted().
> Its not just the order you add items to the dict. To store an
> arbitrary order I suspect you would need to maintain a
> secondary list with the keys in the order of insertion.
> The most reliable way to dop that would be to subclass
> dict. Somebody may already have done that so its worth
> a google...
>
> HTH,
>

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.
_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to