-
-
Notifications
You must be signed in to change notification settings - Fork 424
Closed
Description
Current behavior:
In [17]: @attr.s()
....: class Bar(object):
....: x = attr.ib()
....:
In [18]: b = Bar(x="foo")
In [19]: b.x
Out[19]: 'foo'
In [20]: help(b.x)
no Python documentation found for 'foo'Desired behavior:
In [17]: @attr.s()
....: class Bar(object):
....: x = attr.ib(help="The x of bar") # or doc="The x of bar" or whatever
....:
In [18]: b = Bar(x="foo")
In [19]: b.x
Out[19]: 'foo'
In [20]: help(b.x)
Help on attribute:
The x of bar(or something like that)
Similar to doing:
n [21]: class Foo(object):
....: def __init__(self):
....: self._x = None
....: @property
....: def x(self):
....: """The x of Foo"""
....: return self._x
....:
In [22]: f = Foo
In [23]: f.x
Out[23]: <property at 0x10a097940>
In [24]: help(f.x)
Help on property:
The x of FooReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels