[Python-checkins] cpython (3.4): make partialmethod example work (closes #21105)

benjamin.peterson python-checkins at python.org
Sun Mar 30 21:07:39 CEST 2014


http://hg.python.org/cpython/rev/ed81acc970d9
changeset:   90044:ed81acc970d9
branch:      3.4
parent:      90042:4e37a4a036c6
user:        Benjamin Peterson <benjamin at python.org>
date:        Sun Mar 30 15:07:09 2014 -0400
summary:
  make partialmethod example work (closes #21105)

files:
  Doc/library/functools.rst |  2 ++
  1 files changed, 2 insertions(+), 0 deletions(-)


diff --git a/Doc/library/functools.rst b/Doc/library/functools.rst
--- a/Doc/library/functools.rst
+++ b/Doc/library/functools.rst
@@ -218,6 +218,8 @@
    Example::
 
       >>> class Cell(object):
+      ...     def __init__(self):
+      ...         self._alive = False
       ...     @property
       ...     def alive(self):
       ...         return self._alive

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list