From: Berker Peksag Date: Thu, 30 Jul 2015 15:06:09 +0000 (+0300) Subject: Issue #15582: Add a whatsnew entry for inspect.getdoc() changes in 3.5. X-Git-Tag: v3.5.0rc1~68 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4333d8bad72c8fa3ff563284edb090e6541022b0;p=thirdparty%2FPython%2Fcpython.git Issue #15582: Add a whatsnew entry for inspect.getdoc() changes in 3.5. Patch by Martin Panter. --- diff --git a/Doc/library/inspect.rst b/Doc/library/inspect.rst index 66b92384f072..3b62e7f5b975 100644 --- a/Doc/library/inspect.rst +++ b/Doc/library/inspect.rst @@ -423,6 +423,9 @@ Retrieving source code 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 --git a/Doc/whatsnew/3.5.rst b/Doc/whatsnew/3.5.rst index 3a3d40505554..dba3ea0d102e 100644 --- a/Doc/whatsnew/3.5.rst +++ b/Doc/whatsnew/3.5.rst @@ -1139,6 +1139,13 @@ Changes in the Python API ``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 --------------------