From: Mariatta Date: Fri, 23 Jun 2017 04:24:23 +0000 (-0700) Subject: [2.7] bpo-30709: Improve code example in Descriptor HowTo doc (GH-2339) (GH-2340) X-Git-Tag: v2.7.14rc1~83 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=508267437cc66fdadc12fb19fb2958c452b8a26f;p=thirdparty%2FPython%2Fcpython.git [2.7] bpo-30709: Improve code example in Descriptor HowTo doc (GH-2339) (GH-2340) (cherry picked from commit b066edfb1b268e90ea11f45dd1827f46d7ceec88) --- diff --git a/Doc/howto/descriptor.rst b/Doc/howto/descriptor.rst index 493f6aed0e46..37ba6a8bfb60 100644 --- a/Doc/howto/descriptor.rst +++ b/Doc/howto/descriptor.rst @@ -258,10 +258,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)