]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Remove some lingering remnants of the short-lived functools.lfu_cache
authorNick Coghlan <ncoghlan@gmail.com>
Tue, 17 Aug 2010 05:22:50 +0000 (05:22 +0000)
committerNick Coghlan <ncoghlan@gmail.com>
Tue, 17 Aug 2010 05:22:50 +0000 (05:22 +0000)
Doc/library/functools.rst
Misc/NEWS

index 77e92f819e09ee37d96535bee3e0b8118f448776..d7287bb67b5851645d57145f91a2e345bed53be5 100644 (file)
@@ -36,33 +36,6 @@ The :mod:`functools` module defines the following functions:
 
    .. versionadded:: 3.2
 
-.. decorator:: lfu_cache(maxsize)
-
-   Decorator to wrap a function with a memoizing callable that saves up to the
-   *maxsize* most frequent calls.  It can save time when an expensive or I/O
-   bound function is periodically called with the same arguments.
-
-   The *maxsize* parameter defaults to 100.  Since a dictionary is used to cache
-   results, the positional and keyword arguments to the function must be
-   hashable.
-
-   The wrapped function is instrumented with two attributes, :attr:`hits`
-   and :attr:`misses` which count the number of successful or unsuccessful
-   cache lookups.  These statistics are helpful for tuning the *maxsize*
-   parameter and for measuring the cache's effectiveness.
-
-   The wrapped function also has a :attr:`clear` attribute which can be
-   called (with no arguments) to clear the cache.
-
-   A `LFU (least frequently used) cache
-   <http://en.wikipedia.org/wiki/Cache_algorithms#Least-Frequently_Used>`_
-   is indicated when the pattern of calls does not change over time, when
-   more the most common calls already seen are the best predictors of the
-   most common upcoming calls (for example, a phonelist of popular
-   help-lines may have access patterns that persist over time).
-
-   .. versionadded:: 3.2
-
 .. decorator:: lru_cache(maxsize)
 
    Decorator to wrap a function with a memoizing callable that saves up to the
index 53643de34716da1d9426e0862757243168c3f4b4..e5bb8b823260d3680e6c5aace586029d7c410ca4 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -200,7 +200,7 @@ Library
 
 - Issue #1286: Allow using fileinput.FileInput as a context manager.
 
-- Add lfu_cache() and lru_cache() decorators to the functools module.
+- Add lru_cache() decorator to the functools module.
 
 Tools/Demos
 -----------