MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / _getdoc

Function _getdoc

tools/python-3.11.9-amd64/Lib/pydoc.py:170–184  ·  view source on GitHub ↗

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.

(object)

Source from the content-addressed store, hash-verified

168 return None
169
170def _getdoc(object):
171 """Get the documentation string for an object.
172
173 All tabs are expanded to spaces. To clean up docstrings that are
174 indented to line up with blocks of code, any whitespace than can be
175 uniformly removed from the second line onwards is removed."""
176 doc = _getowndoc(object)
177 if doc is None:
178 try:
179 doc = _finddoc(object)
180 except (AttributeError, TypeError):
181 return None
182 if not isinstance(doc, str):
183 return None
184 return inspect.cleandoc(doc)
185
186def getdoc(object):
187 """Get the doc string or comments for an object."""

Callers 2

getdocFunction · 0.85
render_docFunction · 0.85

Calls 2

_getowndocFunction · 0.85
_finddocFunction · 0.70

Tested by

no test coverage detected