MCPcopy Index your code
hub / github.com/RustPython/RustPython / docother

Method docother

Lib/pydoc.py:1657–1670  ·  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

1655 docproperty = docdata
1656
1657 def docother(self, object, name=None, mod=None, parent=None, *ignored,
1658 maxlen=None, doc=None):
1659 """Produce text documentation for a data object."""
1660 repr = self.repr(object)
1661 if maxlen:
1662 line = (name and name + ' = ' or '') + repr
1663 chop = maxlen - len(line)
1664 if chop < 0: repr = repr[:chop] + '...'
1665 line = (name and self.bold(name) + ' = ' or '') + repr
1666 if not doc:
1667 doc = getdoc(object)
1668 if doc:
1669 line += '\n' + self.indent(str(doc)) + '\n'
1670 return line
1671
1672class _PlainTextDoc(TextDoc):
1673 """Subclass of TextDoc which overrides string styling"""

Callers 2

docmoduleMethod · 0.95
spilldataMethod · 0.95

Calls 6

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

Tested by

no test coverage detected