8000 [3.6] bpo-30709: Improve code example in Descriptor HowTo doc (GH-233… · python/cpython@d79ac2c · GitHub
[go: up one dir, main page]

Skip to content

Commit d79ac2c

Browse files
authored
[3.6] bpo-30709: Improve code example in Descriptor HowTo doc (GH-2339) (GH-2342)
(cherry picked from commit b066edf)
1 parent 8baf78b commit d79ac2c

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