This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients georg.brandl, ncoghlan, rhettinger
Date 2010-11-30.04:55:32
SpamBayes Score 0.000304588
Marked as misclassified No
Message-id <>
Raymond suggested a simple cache_info() method that returns a named tuple as a possible alternative.

I like that idea, as it makes displaying debugging information (the intended use case for these attributes) absolutely trivial:

>>> import functools
>>> @functools.lru_cache()
... def f(x):
...   return x
>>> f.cache_info()
lru_cache_info(maxsize=100, currsize=0, hits=0, misses=0)

(Alternative patch attached)
Date User Action Args
2010-11-30 04:55:34ncoghlansetrecipients: + ncoghlan, georg.brandl, rhettinger
2010-11-30 04:55:33ncoghlansetmessageid: <>
2010-11-30 04:55:32ncoghlanlinkissue10586 messages
2010-11-30 04:55:32ncoghlancreate