bpo-30709: Improve code example in Descriptor HowTo doc (GH-2339)
This commit is contained in:
parent
ea007984d3
commit
b066edfb1b
|
@ -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)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue