Karthikeyan Singaravelan <tir.kar...@gmail.com> added the comment:
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 ---------- nosy: +rhettinger, xtreak versions: -Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue39125> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com