Skip to content

Commit 8ff6b31

Browse files
sirosenjaraco
andcommitted
Minor tweaks to cached_method docs
- Fix doc references - Use imperative mood in a comment Co-authored-by: Jason R. Coombs <308610+jaraco@users.noreply.github.com>
1 parent 1425819 commit 8ff6b31

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

Doc/library/functools.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ The :mod:`!functools` module defines the following functions:
147147
return DataSet([value + shift for value in self._data])
148148

149149
On instances, :func:`cached_method` behaves very similarly to :func:`cache`,
150-
providing :func:`cache_info` and :func:`cache_clear`.
150+
providing :func:`!cache_info` and :func:`!cache_clear`.
151151

152152
The *cached_method* does not prevent all possible race conditions in
153153
multi-threaded usage. The function could run more than once on the

Lib/functools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1236,7 +1236,7 @@ def __get__(self, instance, owner=None):
12361236
return self._get_or_create_cached_func(instance)
12371237

12381238
def _get_or_create_cached_func(self, instance):
1239-
# similar to singledispatch(), we want to defer use of weakref until/unless it
1239+
# similar to singledispatch(), defer use of weakref until/unless it
12401240
# is needed
12411241
import weakref
12421242

0 commit comments

Comments
 (0)