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

Method docother

Lib/pydoc.py:1611–1624  ·  view source on GitHub ↗

Produce text documentation for a data object.

(self, object, name=None, mod=None, parent=None, *ignored,
                 maxlen=None, doc=None)

Source from the content-addressed store, hash-verified

1609 docproperty = docdata
1610
1611 def docother(self, object, name=None, mod=None, parent=None, *ignored,
1612 maxlen=None, doc=None):
1613 """Produce text documentation for a data object."""
1614 repr = self.repr(object)
1615 if maxlen:
1616 line = (name and name + ' = ' or '') + repr
1617 chop = maxlen - len(line)
1618 if chop < 0: repr = repr[:chop] + '...'
1619 line = (name and self.bold(name) + ' = ' or '') + repr
1620 if not doc:
1621 doc = getdoc(object)
1622 if doc:
1623 line += '\n' + self.indent(str(doc)) + '\n'
1624 return line
1625
1626class _PlainTextDoc(TextDoc):
1627 """Subclass of TextDoc which overrides string styling"""

Callers 2

docmoduleMethod · 0.95
spilldataMethod · 0.95

Calls 5

boldMethod · 0.95
indentMethod · 0.95
strFunction · 0.85
getdocFunction · 0.70
reprMethod · 0.45

Tested by

no test coverage detected