Kaydet (Commit) 3daaf5f8 authored tarafından Nick Coghlan's avatar Nick Coghlan

Fix functools.partialmethod docs and __all__

üst 21ea21ef
...@@ -223,8 +223,8 @@ The :mod:`functools` module defines the following functions: ...@@ -223,8 +223,8 @@ The :mod:`functools` module defines the following functions:
... return self._alive ... return self._alive
... def set_state(self, state): ... def set_state(self, state):
... self._alive = bool(state) ... self._alive = bool(state)
... set_alive = partialmethod(set_alive, True) ... set_alive = partialmethod(set_state, True)
... set_dead = partialmethod(set_alive, False) ... set_dead = partialmethod(set_state, False)
... ...
>>> c = Cell() >>> c = Cell()
>>> c.alive >>> c.alive
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
__all__ = ['update_wrapper', 'wraps', 'WRAPPER_ASSIGNMENTS', 'WRAPPER_UPDATES', __all__ = ['update_wrapper', 'wraps', 'WRAPPER_ASSIGNMENTS', 'WRAPPER_UPDATES',
'total_ordering', 'cmp_to_key', 'lru_cache', 'reduce', 'partial', 'total_ordering', 'cmp_to_key', 'lru_cache', 'reduce', 'partial',
'singledispatch'] 'partialmethod', 'singledispatch']
try: try:
from _functools import reduce from _functools import reduce
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment