Re: How to use the docstring in this property example

2016-01-21 Thread Peter Otten
Robert wrote: > Hi, > > I read below code snippet on link: > https://docs.python.org/2/library/functions.html#property > > -- > class C(object): > def __init__(self): > self._x = None > > def getx(self): > return self._x > > def setx(self, value): >

Re: How to use the docstring in this property example

2016-01-20 Thread Steven D'Aprano
On Thursday 21 January 2016 15:00, Robert wrote: > Hi, > > I read below code snippet on link: > https://docs.python.org/2/library/functions.html#property Property docstrings are hard to get to. But with the class C you gave, this works in the interactive interpreter: help(C.__dict__['x']) dis

How to use the docstring in this property example

2016-01-20 Thread Robert
Hi, I read below code snippet on link: https://docs.python.org/2/library/functions.html#property -- class C(object): def __init__(self): self._x = None def getx(self): return self._x def setx(self, value): self._x = value def delx(self):