From 00f2f97dbd3db898e5d6c2368edc780a81e2e5fe Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Wed, 1 Dec 2010 00:47:56 +0000 Subject: [PATCH] Doc and docstring nits. --- Doc/library/functools.rst | 4 ++++ Lib/functools.py | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Doc/library/functools.rst b/Doc/library/functools.rst index 9c44fb1320..c593d70c59 100644 --- a/Doc/library/functools.rst +++ b/Doc/library/functools.rst @@ -91,6 +91,10 @@ The :mod:`functools` module defines the following functions: .. versionadded:: 3.2 + .. seealso:: + + Recipe for a `plain cache without the LRU feature + `_. .. decorator:: total_ordering diff --git a/Lib/functools.py b/Lib/functools.py index c558a5e8e4..0fbf3cd370 100644 --- a/Lib/functools.py +++ b/Lib/functools.py @@ -121,9 +121,9 @@ def lru_cache(maxsize=100): Arguments to the cached function must be hashable. - View the cache statistics named tuple (maxsize, size, hits, misses) with + View the cache statistics named tuple (hits, misses, maxsize, currsize) with f.cache_info(). Clear the cache and statistics with f.cache_clear(). - And access the underlying function with f.__wrapped__. + Access the underlying function with f.__wrapped__. See: http://en.wikipedia.org/wiki/Cache_algorithms#Least_Recently_Used -- 2.40.0