# HG changeset patch # Parent 101c502f8ae8d62b898e1bf43721f7742032ad64 diff -r 101c502f8ae8 Doc/library/inspect.rst --- a/Doc/library/inspect.rst Thu Jul 30 00:44:02 2015 +0000 +++ b/Doc/library/inspect.rst Thu Jul 30 00:59:36 2015 +0000 @@ -404,6 +404,9 @@ a class, a method, a property or a descriptor, retrieve the documentation string from the inheritance hierarchy. + .. versionchanged:: 3.5 + Documentation strings are now inherited if not overridden. + .. function:: getcomments(object) diff -r 101c502f8ae8 Doc/whatsnew/3.5.rst --- a/Doc/whatsnew/3.5.rst Thu Jul 30 00:44:02 2015 +0000 +++ b/Doc/whatsnew/3.5.rst Thu Jul 30 00:59:36 2015 +0000 @@ -1139,6 +1139,13 @@ ``True`` when finding the empty string and the indexes are completely out of range. See :issue:`24284`. +* The :func:`inspect.getdoc` function now returns documentation strings + inherited from base classes. Documentation strings no longer need to be + duplicated if the inherited documentation is appropriate. To suppress an + inherited string, an empty string must be specified (or the documentation + may be filled in). This change affects the output of the :mod:`pydoc` + module and the :func:`help` function. See :issue:`15582`. + Changes in the C API --------------------