]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix functools.partialmethod docs and __all__
authorNick Coghlan <ncoghlan@gmail.com>
Mon, 4 Nov 2013 13:32:16 +0000 (23:32 +1000)
committerNick Coghlan <ncoghlan@gmail.com>
Mon, 4 Nov 2013 13:32:16 +0000 (23:32 +1000)
Doc/library/functools.rst
Lib/functools.py

index 4eb263a84279ef92a4b1dc4caadedd424ddfecb1..77cd8384b1ff71d883a10ae6f5d2492a05424b56 100644 (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
index 8989361f4ca9965e5b446fa9ecea1fb58144fcd9..1e79b31140b91b64a38da118d1fdc8d06b974c08 100644 (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