diff options
author | Raymond Hettinger <rhettinger@users.noreply.github.com> | 2018-09-14 07:53:20 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-14 07:53:20 (GMT) |
commit | 902bcd9a1e2c73c6de5510b771c590b618c4c94e (patch) | |
tree | 605cd99f76b44771e0bc9d6a2bee6a50f1c54987 /Doc | |
parent | 5ac704306f4b81ae3f28d8742408d3214b145e8a (diff) | |
download | cpython-902bcd9a1e2c73c6de5510b771c590b618c4c94e.zip cpython-902bcd9a1e2c73c6de5510b771c590b618c4c94e.tar.gz cpython-902bcd9a1e2c73c6de5510b771c590b618c4c94e.tar.bz2 |
Note that distinct argument patterns can be cached separately (GH-9298)
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/functools.rst | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Doc/library/functools.rst b/Doc/library/functools.rst index 1b94f33..214d573 100644 --- a/Doc/library/functools.rst +++ b/Doc/library/functools.rst @@ -85,6 +85,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. |