Fix functools.partialmethod docs and __all__

This commit is contained in:
Nick Coghlan 2013-11-04 23:32:16 +10:00
parent 21ea21ef6d
commit 3daaf5f89d
2 changed files with 3 additions and 3 deletions

View File

@ -223,8 +223,8 @@ The :mod:`functools` module defines the following functions:
... return self._alive
... def set_state(self, state):
... self._alive = bool(state)
... set_alive = partialmethod(set_alive, True)
... set_dead = partialmethod(set_alive, False)
... set_alive = partialmethod(set_state, True)
... set_dead = partialmethod(set_state, False)
...
>>> c = Cell()
>>> c.alive

View File

@ -11,7 +11,7 @@
__all__ = ['update_wrapper', 'wraps', 'WRAPPER_ASSIGNMENTS', 'WRAPPER_UPDATES',
'total_ordering', 'cmp_to_key', 'lru_cache', 'reduce', 'partial',
'singledispatch']
'partialmethod', 'singledispatch']
try:
from _functools import reduce