Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3daaf5f

Browse files
committed
Fix functools.partialmethod docs and __all__
1 parent 21ea21e commit 3daaf5f

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

Doc/library/functools.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,8 @@ The :mod:`functools` module defines the following functions:
223223
... return self._alive
224224
... def set_state(self, state):
225225
... self._alive = bool(state)
226-
... set_alive = partialmethod(set_alive, True)
227-
... set_dead = partialmethod(set_alive, False)
226+
... set_alive = partialmethod(set_state, True)
227+
... set_dead = partialmethod(set_state, False)
228228
...
229229
>>> c = Cell()
230230
>>> c.alive

Lib/functools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
__all__ = ['update_wrapper', 'wraps', 'WRAPPER_ASSIGNMENTS', 'WRAPPER_UPDATES',
1313
'total_ordering', 'cmp_to_key', 'lru_cache', 'reduce', 'partial',
14-
'singledispatch']
14+
'partialmethod', 'singledispatch']
1515

1616
try:
1717
from _functools import reduce

0 commit comments

Comments
 (0)