]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-107619: Extend functools LRU cache docs with generators and async functions (...
authorHadházy Tamás <85063808+Hels15@users.noreply.github.com>
Sun, 20 Aug 2023 10:33:15 +0000 (11:33 +0100)
committerGitHub <noreply@github.com>
Sun, 20 Aug 2023 10:33:15 +0000 (10:33 +0000)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Doc/library/functools.rst

index 40f43f8b3519cdf30050b58e666d1fd23ddf9b09..f736eb0aca1ac5d1436397047b2cd0c79145aa2c 100644 (file)
@@ -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::