Skip to content

Commit 902bcd9

Browse files
authored
Note that distinct argument patterns can be cached separately (GH-9298)
1 parent 5ac7043 commit 902bcd9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Doc/library/functools.rst

+5
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,11 @@ The :mod:`functools` module defines the following functions:
8585
Since a dictionary is used to cache results, the positional and keyword
8686
arguments to the function must be hashable.
8787

88+
Distinct argument patterns may be considered to be distinct calls with
89+
separate cache entries. For example, `f(a=1, b=2)` and `f(b=2, a=1)`
90+
differ in their keyword argument order and may have two separate cache
91+
entries.
92+
8893
If *maxsize* is set to ``None``, the LRU feature is disabled and the cache can
8994
grow without bound. The LRU feature performs best when *maxsize* is a
9095
power-of-two.

0 commit comments

Comments
 (0)