We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fa02422 commit 1ae9004Copy full SHA for 1ae9004
Doc/library/functools.rst
@@ -42,11 +42,11 @@ The :mod:`functools` module defines the following functions:
42
def factorial(n):
43
return n * factorial(n-1) if n else 1
44
45
- >>> factorial(10) # no previously cached result, makes 11 recursive calls
+ >>> factorial(10) # no previously cached result, makes 11 recursive calls
46
3628800
47
- >>> factorial(5) # just looks up cached value result
+ >>> factorial(5) # no new calls, just returns the cached result
48
120
49
- >>> factorial(12) # makes two new recursive calls, the other 10 are cached
+ >>> factorial(12) # two new recursive calls, factorial(10) is cached
50
479001600
51
52
The cache is threadsafe so that the wrapped function can be used in
0 commit comments