... 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
__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