diff options
author | Raymond Hettinger <python@rcn.com> | 2010-11-30 20:02:57 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2010-11-30 20:02:57 (GMT) |
commit | cc03858d8f629ad9721276fbd00f0c2b86882a65 (patch) | |
tree | 16fea7a7ea4bebe7e8bcabf183e8f2ce816ddaa7 /Doc/library/functools.rst | |
parent | 7496b4171e6a34a82ba388fa0ef125d8b87aa2a1 (diff) | |
download | cpython-cc03858d8f629ad9721276fbd00f0c2b86882a65.zip cpython-cc03858d8f629ad9721276fbd00f0c2b86882a65.tar.gz cpython-cc03858d8f629ad9721276fbd00f0c2b86882a65.tar.bz2 |
Documentation nits.
Diffstat (limited to 'Doc/library/functools.rst')
-rw-r--r-- | Doc/library/functools.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/library/functools.rst b/Doc/library/functools.rst index 7c9b9ca..9c44fb1 100644 --- a/Doc/library/functools.rst +++ b/Doc/library/functools.rst @@ -63,16 +63,16 @@ The :mod:`functools` module defines the following functions: :attr:`__wrapped__` attribute. This is useful for introspection, for bypassing the cache, or for rewrapping the function with a different cache. - A `LRU (least recently used) cache + An `LRU (least recently used) cache <http://en.wikipedia.org/wiki/Cache_algorithms#Least_Recently_Used>`_ works best when more recent calls are the best predictors of upcoming calls (for example, the most popular articles on a news server tend to change daily). The cache's size limit assures that the cache does not grow without bound on long-running processes such as web servers. - Example -- Caching static web content:: + Example of an LRU cache for static web content:: - @functools.lru_cache(maxsize=20) + @lru_cache(maxsize=20) def get_pep(num): 'Retrieve text of a Python Enhancement Proposal' resource = 'http://www.python.org/dev/peps/pep-%04d/' % num |