Kaydet (Commit) b066edfb authored tarafından _ = NaN's avatar _ = NaN Kaydeden (comit) Mariatta

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

üst ea007984
...@@ -252,10 +252,10 @@ to wrap access to the value attribute in a property data descriptor:: ...@@ -252,10 +252,10 @@ to wrap access to the value attribute in a property data descriptor::
class Cell(object): class Cell(object):
. . . . . .
def getvalue(self, obj): def getvalue(self):
"Recalculate cell before returning value" "Recalculate the cell before returning value"
self.recalc() self.recalc()
return obj._value return self._value
value = property(getvalue) 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