This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author xtreak
Recipients McSinyx, docs@python, rhettinger, xtreak
Date 2019-12-23.16:37:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1577119033.83.0.314040027369.issue39125@roundup.psfhosted.org>
In-reply-to
Content
Currently docstring written for even property.setter is ignored in help as inspect.getdoc only inspects property.fget [0] for docstrings. I feel docs for setter could also be included. The docs also indicate the same at https://docs.python.org/3.6/library/functions.html#property . In the absence of docs maybe the signature for getter and setter could be included as per this proposal.

class Foo:
    @property
    def bar(self) -> int:
        '''Bar docs for property'''
        return 42

    @bar.setter
    def bar(self, value: int) -> None:
        '''Bar docs for setter'''
        pass

help(Foo.bar)

Help on property:

    Bar docs for property


[0] https://github.com/python/cpython/blob/4b3b1226e86df6cd45e921c8f2ad23c3639c43b2/Lib/inspect.py#L580
History
Date User Action Args
2019-12-23 16:37:13xtreaksetrecipients: + xtreak, rhettinger, docs@python, McSinyx
2019-12-23 16:37:13xtreaksetmessageid: <1577119033.83.0.314040027369.issue39125@roundup.psfhosted.org>
2019-12-23 16:37:13xtreaklinkissue39125 messages
2019-12-23 16:37:13xtreakcreate