Kaydet (Commit) d79ac2c2 authored tarafından Mariatta's avatar Mariatta Kaydeden (comit) GitHub

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

(cherry picked from commit b066edfb)
üst 8baf78b9
......@@ -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)
......
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