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

Method docother

tools/python-3.11.9-amd64/Lib/pydoc.py:1613–1626  ·  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

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