bpo-30709: Improve code example in Descriptor HowTo doc (GH-2339)

This commit is contained in:
_ = NaN 2017-06-23 11:54:35 +08:00 committed by Mariatta
parent ea007984d3
commit b066edfb1b
1 changed files with 3 additions and 3 deletions

View File

@ -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)