PyDocs

Nav

Python Runtime Services

getdoc

inspect

function (source)
  • getdoc(object, *, inherit_class_doc=True, fallback_to_class_doc=True)
Get the documentation string for an object.

All tabs are expanded to spaces.  To clean up docstrings that are
indented to line up with blocks of code, any whitespace than can be
uniformly removed from the second line onwards is removed.
Changed in 3.5, 3.15
  • 3.5: Documentation strings are now inherited if not overridden.
  • 3.15: Added parameters inherit_class_doc and fallback_to_class_doc. Documentation strings on cached_property objects are now inherited if not overridden.
0 Examples
No examples for inspect/getdoc.
See Also
No see-alsos for inspect/getdoc
0 Notes
No notes for getdoc