Ordered dicts
Duncan Booth
duncan.booth at invalid.invalid
Tue Sep 26 10:36:04 EDT 2006
bearophileHUGS at lycos.com wrote:
>> Then if you reinsert the deleted value it goes back in at its
>> original order.
>
> Uhm, this doesn't sound good. Thank you, I missed this detail :-)
> Then the doubly-linked list, and the links fixing seem necessary...
>
An alternative to a doubly linked list might be to never reuse deleted
entries but if the number of deleted entries exceeds a certain proportion
just pack the dictionary.
More information about the Python-list
mailing list