From: _ = NaN Date: Fri, 23 Jun 2017 03:54:35 +0000 (+0800) Subject: bpo-30709: Improve code example in Descriptor HowTo doc (GH-2339) X-Git-Tag: v3.7.0a1~546 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b066edfb1b268e90ea11f45dd1827f46d7ceec88;p=python bpo-30709: Improve code example in Descriptor HowTo doc (GH-2339) --- diff --git a/Doc/howto/descriptor.rst b/Doc/howto/descriptor.rst index 2dd6c34e2c..b34937585e 100644 --- a/Doc/howto/descriptor.rst +++ b/Doc/howto/descriptor.rst @@ -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)