[Python-Dev] new LRU cache API in Py3.2 (original) (raw)

Raymond Hettinger raymond.hettinger at gmail.com
Sat Sep 4 23:07:34 CEST 2010


On Sep 4, 2010, at 11:20 AM, Antoine Pitrou wrote:

Well, perhaps lrucache() would have deserved a review before committing?

Not everything needs to be designed by committee. This API is based on one that was published as a recipe several years ago and has been used in a number of companies. Its design reflects feedback from a variety of advanced python users (the keyword argument support from Miki Tebeka, the concurrency support from Jim Baker, the clearing option and introspectability from Nick Coghlan, etc). Aside from the compact API, the actual implementation is so dirt simple that it will be trivial for folks to roll their own variants if they have more exotic needs. After I'm done with other work for the alpha, I'll take a further look at the suggestions here.

Raymond



More information about the Python-Dev mailing list