[Python-checkins] r86907 - in python/branches/py3k: Doc/library/functools.rst Lib/functools.py

raymond.hettinger python-checkins at python.org
Wed Dec 1 01:48:02 CET 2010


Author: raymond.hettinger
Date: Wed Dec  1 01:47:56 2010
New Revision: 86907

Log:
Doc and docstring nits.

Modified:
   python/branches/py3k/Doc/library/functools.rst
   python/branches/py3k/Lib/functools.py

Modified: python/branches/py3k/Doc/library/functools.rst
==============================================================================
--- python/branches/py3k/Doc/library/functools.rst	(original)
+++ python/branches/py3k/Doc/library/functools.rst	Wed Dec  1 01:47:56 2010
@@ -91,6 +91,10 @@
 
    .. 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
 

Modified: python/branches/py3k/Lib/functools.py
==============================================================================
--- python/branches/py3k/Lib/functools.py	(original)
+++ python/branches/py3k/Lib/functools.py	Wed Dec  1 01:47:56 2010
@@ -121,9 +121,9 @@
 
     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
 


More information about the Python-checkins mailing list