Skip to content

Commit 06c2b18

Browse files
sirosenhugovkStanFromIreland
authored
Apply suggestions from code review
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Co-authored-by: Stan Ulbrych <stan@python.org>
1 parent 57cc653 commit 06c2b18

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

Doc/library/functools.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ The :mod:`!functools` module defines the following functions:
123123

124124

125125
.. decorator:: cached_method(func)
126-
cached_method(maxsize=128, typed=False)
126+
cached_method(maxsize=None, typed=False)
127127

128128
Decorator to wrap a method with a bounded or unbounded cache.
129129

@@ -164,7 +164,7 @@ The :mod:`!functools` module defines the following functions:
164164
*maxsize* and *typed* are supported as keyword arguments to the decorator,
165165
and are passed to the underlying :func:`lru_cache`.
166166

167-
.. versionadded:: 3.16
167+
.. versionadded:: next
168168

169169

170170
.. function:: cmp_to_key(func)

Lib/functools.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
from reprlib import recursive_repr
2121
from types import FunctionType, GenericAlias, MethodType, MappingProxyType, UnionType
2222
from _thread import RLock
23-
2423
lazy import weakref
2524

2625
################################################################################
@@ -1181,7 +1180,7 @@ def __get__(self, instance, owner=None):
11811180
__class_getitem__ = classmethod(GenericAlias)
11821181

11831182
################################################################################
1184-
### cached_method -- a version of lru_cache() which uses `id(self)`
1183+
### cached_method -- a version of lru_cache() which uses id(self)
11851184
################################################################################
11861185

11871186

0 commit comments

Comments
 (0)