Skip to content

Commit a8f189f

Browse files
Note that distinct argument patterns can be cached separately (GH-9298) (GH-9299)
(cherry picked from commit 902bcd9) Co-authored-by: Raymond Hettinger <[email protected]>
1 parent d0491cd commit a8f189f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Doc/library/functools.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ The :mod:`functools` module defines the following functions:
5252
Since a dictionary is used to cache results, the positional and keyword
5353
arguments to the function must be hashable.
5454

55+
Distinct argument patterns may be considered to be distinct calls with
56+
separate cache entries. For example, `f(a=1, b=2)` and `f(b=2, a=1)`
57+
differ in their keyword argument order and may have two separate cache
58+
entries.
59+
5560
If *maxsize* is set to ``None``, the LRU feature is disabled and the cache can
5661
grow without bound. The LRU feature performs best when *maxsize* is a
5762
power-of-two.

0 commit comments

Comments
 (0)