Skip to content

Commit 8aa15ba

Browse files
authored
[3.5] bpo-30709: Improve code example in Descriptor HowTo doc (GH-2339) (GH-2341)
(cherry picked from commit b066edf)
1 parent ce1bd6a commit 8aa15ba

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Doc/howto/descriptor.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -252,10 +252,10 @@ to wrap access to the value attribute in a property data descriptor::
252252

253253
class Cell(object):
254254
. . .
255-
def getvalue(self, obj):
256-
"Recalculate cell before returning value"
255+
def getvalue(self):
256+
"Recalculate the cell before returning value"
257257
self.recalc()
258-
return obj._value
258+
return self._value
259259
value = property(getvalue)
260260

261261

0 commit comments

Comments
 (0)