ID EN
Inspect

getdoc

Python 3.11

Get the documentation string for an object, cleaned up with cleandoc(). If the documentation string for an object is not provided and the object is a class, a method, a property or a descriptor, retrieve the documentation string from the inheritance hierarchy. Return None if the documentation string is invalid or missing.

Syntax

PYTHON
inspect.getdoc(object)

See Also

cleandoc()