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

Method multicolumn

Lib/pydoc.py:661–671  ·  view source on GitHub ↗

Format a list of items into a multi-column list.

(self, list, format)

Source from the content-addressed store, hash-verified

659 ' ', '&nbsp;', '\n', '<br>\n')
660
661 def multicolumn(self, list, format):
662 """Format a list of items into a multi-column list."""
663 result = ''
664 rows = (len(list) + 3) // 4
665 for col in range(4):
666 result = result + '<td class="multicolumn">'
667 for i in range(rows*col, rows*col+rows):
668 if i < len(list):
669 result = result + format(list[i]) + '<br>\n'
670 result = result + '</td>'
671 return '<table><tr>%s</tr></table>' % result
672
673 def grey(self, text): return '<span class="grey">%s</span>' % text
674

Callers 6

docmoduleMethod · 0.95
indexMethod · 0.95
html_indexFunction · 0.80
html_topicsFunction · 0.80
html_keywordsFunction · 0.80
html_topicpageFunction · 0.80

Calls 1

formatFunction · 0.85

Tested by

no test coverage detected