diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2020-05-18 17:25:07 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-18 17:25:07 (GMT) |
commit | 08b47c367a08f571a986366aa33828d3951fa88d (patch) | |
tree | be06ca168536a48a19f2a093192ad7137ff8aa3c /Doc | |
parent | 98e42d1f882b9b59f587d538c562dbc7d11c64c3 (diff) | |
download | cpython-08b47c367a08f571a986366aa33828d3951fa88d.zip cpython-08b47c367a08f571a986366aa33828d3951fa88d.tar.gz cpython-08b47c367a08f571a986366aa33828d3951fa88d.tar.bz2 |
bpo-40257: Revert changes to inspect.getdoc() (GH-20073)
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/inspect.rst | 5 | ||||
-rw-r--r-- | Doc/whatsnew/3.9.rst | 5 |
2 files changed, 1 insertions, 9 deletions
diff --git a/Doc/library/inspect.rst b/Doc/library/inspect.rst index 6346451..d00a30f 100644 --- a/Doc/library/inspect.rst +++ b/Doc/library/inspect.rst @@ -473,15 +473,12 @@ Retrieving source code Get the documentation string for an object, cleaned up with :func:`cleandoc`. If the documentation string for an object is not provided and the object is - a method, a property or a descriptor, retrieve the documentation + 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. - .. versionchanged:: 3.9 - Documentation strings for classes are no longer inherited. - .. function:: getcomments(object) diff --git a/Doc/whatsnew/3.9.rst b/Doc/whatsnew/3.9.rst index 66e7c64..593f523 100644 --- a/Doc/whatsnew/3.9.rst +++ b/Doc/whatsnew/3.9.rst @@ -846,11 +846,6 @@ Changes in the Python API :class:`ftplib.FTP_TLS` as a keyword-only parameter, and the default encoding is changed from Latin-1 to UTF-8 to follow :rfc:`2640`. -* :func:`inspect.getdoc` no longer returns docstring inherited from the type - of the object or from parent class if it is a class if it is not defined - in the object itself. - (Contributed by Serhiy Storchaka in :issue:`40257`.) - * :meth:`asyncio.loop.shutdown_default_executor` has been added to :class:`~asyncio.AbstractEventLoop`, meaning alternative event loops that inherit from it should have this method defined. |