]> granicus.if.org Git - python/commitdiff
Doc and docstring nits.
authorRaymond Hettinger <python@rcn.com>
Wed, 1 Dec 2010 00:47:56 +0000 (00:47 +0000)
committerRaymond Hettinger <python@rcn.com>
Wed, 1 Dec 2010 00:47:56 +0000 (00:47 +0000)
Doc/library/functools.rst
Lib/functools.py

index 9c44fb1320baf49d6d44c3c609efe78b53771304..c593d70c59d05d5f83fa524ce8f2afeaa7a02bf1 100644 (file)
@@ -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
+      <http://code.activestate.com/recipes/577479-simple-caching-decorator/>`_.
 
 .. decorator:: total_ordering
 
index c558a5e8e4b541eb53aa9bfaf440071d355d1b42..0fbf3cd3706b0c97b249f47d5c0905c818b5ce9e 100644 (file)
@@ -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