News for hackers. Stuff that matters.
Re:Python dicts are now ordered by kccqzy on Friday February 07, 2020 @10:21PM (#22273576)
Say, a simple LRU cache:

* Inserting into the cache is just normal insertion.

* To delete excessive items, simply iterate to get the first few items' keys, then delete.

* To lookup, simply do a key-based lookup, then delete and re-insert.

There are no comments on this comment yet.