MCPcopy Index your code
hub / github.com/python/cpython / getdoc

Function getdoc

Lib/pydoc.py:137–140  ·  view source on GitHub ↗

Get the doc string or comments for an object.

(object)

Source from the content-addressed store, hash-verified

135 inherit_class_doc=False)
136
137def getdoc(object):
138 """Get the doc string or comments for an object."""
139 result = _getdoc(object) or inspect.getcomments(object)
140 return result and re.sub('^ *\n', '', result.rstrip()) or ''
141
142def splitdoc(doc):
143 """Split a doc string into a synopsis line (if any) and the rest."""

Callers 11

docmoduleMethod · 0.70
spilldataMethod · 0.70
docclassMethod · 0.70
docroutineMethod · 0.70
docdataMethod · 0.70
docmoduleMethod · 0.70
docclassMethod · 0.70
spilldataMethod · 0.70
docroutineMethod · 0.70
docdataMethod · 0.70
docotherMethod · 0.70

Calls 3

_getdocFunction · 0.85
subMethod · 0.45
rstripMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…