Commit 50826743 authored by Mariatta's avatar Mariatta Committed by GitHub

[2.7] bpo-30709: Improve code example in Descriptor HowTo doc (GH-2339) (GH-2340)

(cherry picked from commit b066edfb)
parent 1ecfa451
......@@ -258,10 +258,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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment