summaryrefslogtreecommitdiffstats
path: root/Doc/howto
diff options
context:
space:
mode:
author_ = NaN <anqurvanillapy@gmail.com>2017-06-23 03:54:35 (GMT)
committerMariatta <Mariatta@users.noreply.github.com>2017-06-23 03:54:35 (GMT)
commitb066edfb1b268e90ea11f45dd1827f46d7ceec88 (patch)
tree6837b8cc2b8dcc56c4005829afdbaeba6252a2af /Doc/howto
parentea007984d3eb4f80f3b632730fa34ae01c4ef188 (diff)
downloadcpython-b066edfb1b268e90ea11f45dd1827f46d7ceec88.zip
cpython-b066edfb1b268e90ea11f45dd1827f46d7ceec88.tar.gz
cpython-b066edfb1b268e90ea11f45dd1827f46d7ceec88.tar.bz2
bpo-30709: Improve code example in Descriptor HowTo doc (GH-2339)
Diffstat (limited to 'Doc/howto')
-rw-r--r--Doc/howto/descriptor.rst6
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)