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

Method section

Lib/pydoc.py:629–648  ·  view source on GitHub ↗

Format a section with a heading.

(self, title, cls, contents, width=6,
                prelude='', marginalia=None, gap=' ')

Source from the content-addressed store, hash-verified

627 ''' % (title, extras or ' ')
628
629 def section(self, title, cls, contents, width=6,
630 prelude='', marginalia=None, gap=' '):
631 """Format a section with a heading."""
632 if marginalia is None:
633 marginalia = '<span class="code">' + '&nbsp;' * width + '</span>'
634 result = ''&#x27;<p>
635<table class="section">
636<tr class="decor %s-decor heading-text">
637<td class="section-title" colspan=3>&nbsp;<br>%s</td></tr>
638 ''&#x27; % (cls, title)
639 if prelude:
640 result = result + ''&#x27;
641<tr><td class="decor %s-decor" rowspan=2>%s</td>
642<td class="decor %s-decor" colspan=2>%s</td></tr>
643<tr><td>%s</td>''&#x27; % (cls, marginalia, cls, prelude, gap)
644 else:
645 result = result + ''&#x27;
646<tr><td class="decor %s-decor">%s</td><td>%s</td>''&#x27; % (cls, marginalia, gap)
647
648 return result + '\n<td class="singlecolumn">%s</td></tr></table>' % contents
649
650 def bigsection(self, title, *args):
651 """Format a section with a big heading."""

Callers 3

bigsectionMethod · 0.95
docclassMethod · 0.95
html_topicpageFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected