From: Raymond Hettinger Date: Tue, 30 Nov 2010 20:02:57 +0000 (+0000) Subject: Documentation nits. X-Git-Tag: v3.2b1~154 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cc03858d8f629ad9721276fbd00f0c2b86882a65;p=thirdparty%2FPython%2Fcpython.git Documentation nits. --- diff --git a/Doc/library/functools.rst b/Doc/library/functools.rst index 7c9b9cabfde1..9c44fb1320ba 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 `_ 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