From 4472cb051ac2f51620c6a4b975effa0bed5e18ce Mon Sep 17 00:00:00 2001 From: AnqurVanillapy Date: Fri, 23 Jun 2017 11:42:15 +0800 Subject: [PATCH] bpo-30709: fixed bad getter example from Doc/Descriptor#Properties --- Doc/howto/descriptor.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Doc/howto/descriptor.rst b/Doc/howto/descriptor.rst index 2dd6c34e2ced02..b34937585ea444 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)