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.0003045875
Marked as misclassified No
Message-id <1291092933.79.0.468038330909.issue10586@psf.upfronthosting.co.za>
In-reply-to
Content
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)
History
Date User Action Args
2010-11-30 04:55:34ncoghlansetrecipients: + ncoghlan, georg.brandl, rhettinger
2010-11-30 04:55:33ncoghlansetmessageid: <1291092933.79.0.468038330909.issue10586@psf.upfronthosting.co.za>
2010-11-30 04:55:32ncoghlanlinkissue10586 messages
2010-11-30 04:55:32ncoghlancreate