diff options
author | Bar Harel <bharel@barharel.com> | 2023-05-31 23:56:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-31 17:56:06 -0500 |
commit | f332594dd47947612e1e5d2faf287930552a5110 (patch) | |
tree | 299ab97f141b4502b3b738afd7f2c710b86394ec /Lib/functools.py | |
parent | a99b9d911e0f8cb11b3436bdd8eb649b15d01a50 (diff) | |
download | cpython-f332594dd47947612e1e5d2faf287930552a5110.tar.gz cpython-f332594dd47947612e1e5d2faf287930552a5110.zip |
gh-105172: Fixed functools.lru_cache typed argument docstring. (GH-105173)
Diffstat (limited to 'Lib/functools.py')
-rw-r--r-- | Lib/functools.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/functools.py b/Lib/functools.py index 72b2103e7a5..4d5e2709007 100644 --- a/Lib/functools.py +++ b/Lib/functools.py @@ -483,8 +483,9 @@ def lru_cache(maxsize=128, typed=False): can grow without bound. If *typed* is True, arguments of different types will be cached separately. - For example, f(3.0) and f(3) will be treated as distinct calls with - distinct results. + For example, f(decimal.Decimal("3.0")) and f(3.0) will be treated as + distinct calls with distinct results. Some types such as str and int may + be cached separately even when typed is false. Arguments to the cached function must be hashable. |