mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
bpo-40257: Revert changes to inspect.getdoc() (GH-20073)
This commit is contained in:
parent
98e42d1f88
commit
08b47c367a
6 changed files with 115 additions and 40 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue