From fa02422918ac3251cdf88a626f90af260bf5224a Mon Sep 17 00:00:00 2001 From: alex <30386655+alexomics@users.noreply.github.com> Date: Wed, 5 Nov 2025 00:05:49 +0000 Subject: [PATCH 1/2] gh-141007: update string module source code link (#141008) In 3.14, the former string.py became `__init__.py` within a new `string` directory that also contains a new submodule file, `templatelib.py`. --- Doc/library/string.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/string.rst b/Doc/library/string.rst index 6336a0ec47b91e..58c836c7382330 100644 --- a/Doc/library/string.rst +++ b/Doc/library/string.rst @@ -4,7 +4,7 @@ .. module:: string :synopsis: Common string operations. -**Source code:** :source:`Lib/string.py` +**Source code:** :source:`Lib/string/__init__.py` -------------- From 1ae900424b3c888d2b2cc97e6ef780717813d658 Mon Sep 17 00:00:00 2001 From: Clifford Gama Date: Wed, 5 Nov 2025 02:29:25 +0200 Subject: [PATCH 2/2] Docs: Fix cached calls count in factorial example (gh-140882) --- Doc/library/functools.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Doc/library/functools.rst b/Doc/library/functools.rst index 37d9f87e7791dc..1d9ac328f32769 100644 --- a/Doc/library/functools.rst +++ b/Doc/library/functools.rst @@ -42,11 +42,11 @@ The :mod:`functools` module defines the following functions: def factorial(n): return n * factorial(n-1) if n else 1 - >>> factorial(10) # no previously cached result, makes 11 recursive calls + >>> factorial(10) # no previously cached result, makes 11 recursive calls 3628800 - >>> factorial(5) # just looks up cached value result + >>> factorial(5) # no new calls, just returns the cached result 120 - >>> factorial(12) # makes two new recursive calls, the other 10 are cached + >>> factorial(12) # two new recursive calls, factorial(10) is cached 479001600 The cache is threadsafe so that the wrapped function can be used in