I have a class like this:
class MyBase(object):
x = 3
"""Documentation for property x"""
class MyObj(MyBase):
x = 0
MyObj.x
MyBase.x
I found a workaround using the property function:
class MyBase(object):
_x = 3
x = property( lambda s: s._x, doc="Documentation for property x")
class MyObj(MyBase):
_x = 0
This is nice in that given an instance variable:
>>> m = MyObj()
>>> m.x
0
one can call help(m)
and get proper documentation of property x
and sphinx also picks this up correctly.