diff options
author | Mariatta <Mariatta@users.noreply.github.com> | 2017-06-23 04:24:33 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-23 04:24:33 (GMT) |
commit | 8aa15ba884b14c1cf65d4c1a4c5abc4253f5c9ed (patch) | |
tree | 34aee03da90ee4e093420a1c38f9b9829e1dbe49 /Doc/howto/descriptor.rst | |
parent | ce1bd6ac7ffaf396157a9ceb55b281a3b196323f (diff) | |
download | cpython-8aa15ba884b14c1cf65d4c1a4c5abc4253f5c9ed.zip cpython-8aa15ba884b14c1cf65d4c1a4c5abc4253f5c9ed.tar.gz cpython-8aa15ba884b14c1cf65d4c1a4c5abc4253f5c9ed.tar.bz2 |
[3.5] bpo-30709: Improve code example in Descriptor HowTo doc (GH-2339) (GH-2341)
(cherry picked from commit b066edfb1b268e90ea11f45dd1827f46d7ceec88)
Diffstat (limited to 'Doc/howto/descriptor.rst')
-rw-r--r-- | Doc/howto/descriptor.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/howto/descriptor.rst b/Doc/howto/descriptor.rst index 2dd6c34..b349375 100644 --- a/Doc/howto/descriptor.rst +++ b/Doc/howto/descriptor.rst @@ -252,10 +252,10 @@ to wrap access to the value attribute in a property data descriptor:: class Cell(object): . . . - def getvalue(self, obj): - "Recalculate cell before returning value" + def getvalue(self): + "Recalculate the cell before returning value" self.recalc() - return obj._value + return self._value value = property(getvalue) |