Simple lru cache?

Martin v. Loewis martin at v.loewis.de
Fri Oct 4 18:12:51 EDT 2002


"Steve Holden" <sholden at holdenweb.com> writes:

> What, you mean like
> 
>     mylst = mylst[:n] + mylst[n+1:] + [mylst[n]]
> 
> for example?

I think Ype will critize this solution for its O(m) complexity, where
m is the number of elements in the cache.

Regards,
Martin




More information about the Python-list mailing list