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

Method section

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

672 ''' % (title, extras or ' ')
673
674 def section(self, title, cls, contents, width=6,
675 prelude='', marginalia=None, gap=' '):
676 """Format a section with a heading."""
677 if marginalia is None:
678 marginalia = '<span class="code">' + '&nbsp;' * width + '</span>'
679 result = ''&#x27;<p>
680<table class="section">
681<tr class="decor %s-decor heading-text">
682<td class="section-title" colspan=3>&nbsp;<br>%s</td></tr>
683 ''&#x27; % (cls, title)
684 if prelude:
685 result = result + ''&#x27;
686<tr><td class="decor %s-decor" rowspan=2>%s</td>
687<td class="decor %s-decor" colspan=2>%s</td></tr>
688<tr><td>%s</td>''&#x27; % (cls, marginalia, cls, prelude, gap)
689 else:
690 result = result + ''&#x27;
691<tr><td class="decor %s-decor">%s</td><td>%s</td>''&#x27; % (cls, marginalia, gap)
692
693 return result + '\n<td class="singlecolumn">%s</td></tr></table>' % contents
694
695 def bigsection(self, title, *args):
696 """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