Self reordering list in Python

Laszlo Zsolt Nagy gandalf at geochemsource.com
Thu Sep 15 09:14:09 EDT 2005


  Hello,

Do you know how to implement a really efficient self reordering list in 
Python? (List with a maximum length. When an item is processed, it 
becomes the first element in the list.) I would like to use this for 
caching of rendered images. Of course I could implement this in pure 
Python, I just wonder if there is a faster implementation that uses some 
cool feature of the standard library. (Maybe a C implementation could be 
added to the collections module?)

   Les





More information about the Python-list mailing list