summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorHadházy Tamás <85063808+Hels15@users.noreply.github.com>2023-08-20 10:33:15 (GMT)
committerGitHub <noreply@github.com>2023-08-20 10:33:15 (GMT)
commit1a713eac47b26899044752f02cbfcb4d628dda2a (patch)
tree9e449e5bbb132304e1a85029ee4f2391b0654399 /Doc/library
parentb1e5d2c601bbd3d435b60deef4818f3622bdfca3 (diff)
downloadcpython-1a713eac47b26899044752f02cbfcb4d628dda2a.zip
cpython-1a713eac47b26899044752f02cbfcb4d628dda2a.tar.gz
cpython-1a713eac47b26899044752f02cbfcb4d628dda2a.tar.bz2
gh-107619: Extend functools LRU cache docs with generators and async functions (#107934)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/functools.rst5
1 files changed, 3 insertions, 2 deletions
diff --git a/Doc/library/functools.rst b/Doc/library/functools.rst
index 40f43f8..f736eb0 100644
--- a/Doc/library/functools.rst
+++ b/Doc/library/functools.rst
@@ -226,8 +226,9 @@ The :mod:`functools` module defines the following functions:
In general, the LRU cache should only be used when you want to reuse
previously computed values. Accordingly, it doesn't make sense to cache
- functions with side-effects, functions that need to create distinct mutable
- objects on each call, or impure functions such as time() or random().
+ functions with side-effects, functions that need to create
+ distinct mutable objects on each call (such as generators and async functions),
+ or impure functions such as time() or random().
Example of an LRU cache for static web content::