Produce text documentation for a data object.
(self, object, name=None, mod=None, parent=None, *ignored,
maxlen=None, doc=None)
| 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 | |
| 1626 | class _PlainTextDoc(TextDoc): |
| 1627 | """Subclass of TextDoc which overrides string styling""" |