Skip to content

Commit 1a713ea

Browse files
Hels15AA-Turnerkumaraditya303
authored
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>
1 parent b1e5d2c commit 1a713ea

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Doc/library/functools.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,9 @@ The :mod:`functools` module defines the following functions:
226226

227227
In general, the LRU cache should only be used when you want to reuse
228228
previously computed values. Accordingly, it doesn't make sense to cache
229-
functions with side-effects, functions that need to create distinct mutable
230-
objects on each call, or impure functions such as time() or random().
229+
functions with side-effects, functions that need to create
230+
distinct mutable objects on each call (such as generators and async functions),
231+
or impure functions such as time() or random().
231232

232233
Example of an LRU cache for static web content::
233234

0 commit comments

Comments
 (0)