[docs] A mistake in a code snippet in `Descriptor HowTo Guide`?
楠字数补丁也
280145668 at qq.com
Sat Apr 30 11:35:00 EDT 2016
class Cell(object): . . . def getvalue(self, obj): "Recalculate cell before returning value" self.recalc() return obj._value value = property(getvalue)
the instance method `getvalue` with a positional argument `obj` can't be used as `property(getvalue)`.
the code snippet is above https://docs.python.org/3.4/howto/descriptor.html#functions-and-methods.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/docs/attachments/20160430/c77ab859/attachment.html>
More information about the docs
mailing list