[Forest] > Okay, but I'd also like a convenient and fast way to find the oldest entry > in an OrderedDict, which I think I'd need for an LRU cache. Skimming the > current patch (od7.diff), I didn't notice one. Perhaps I simply missed > something. Shouldn't popitem() allow the caller to choose which end from > which to pop? Forest, I've taken another look at what's involved and am inclined to recommend the idea. It can be done without mucking-up the regular dict API and without precluding any of the other possible underlying algorithms. I like that it supports an entire new categoy of use cases with only a trivial, easily-understood API extension. Patch is attached at http://bugs.python.org/issue5397 Raymond
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4