]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Note that distinct argument patterns can be cached separately (GH-9298) (GH-9299)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 14 Sep 2018 08:13:17 +0000 (01:13 -0700)
committerRaymond Hettinger <rhettinger@users.noreply.github.com>
Fri, 14 Sep 2018 08:13:17 +0000 (01:13 -0700)
(cherry picked from commit 902bcd9a1e2c73c6de5510b771c590b618c4c94e)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
Doc/library/functools.rst

index a81e819103adf3f59e01373b50958963a1314d9a..3413cd353ca90607c22b3139ac8bb874dafb932b 100644 (file)
@@ -52,6 +52,11 @@ The :mod:`functools` module defines the following functions:
    Since a dictionary is used to cache results, the positional and keyword
    arguments to the function must be hashable.
 
+   Distinct argument patterns may be considered to be distinct calls with
+   separate cache entries.  For example, `f(a=1, b=2)` and `f(b=2, a=1)`
+   differ in their keyword argument order and may have two separate cache
+   entries.
+
    If *maxsize* is set to ``None``, the LRU feature is disabled and the cache can
    grow without bound.  The LRU feature performs best when *maxsize* is a
    power-of-two.