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

Method multicolumn

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

704 ' ', '&nbsp;', '\n', '<br>\n')
705
706 def multicolumn(self, list, format):
707 """Format a list of items into a multi-column list."""
708 result = ''
709 rows = (len(list) + 3) // 4
710 for col in range(4):
711 result = result + '<td class="multicolumn">'
712 for i in range(rows*col, rows*col+rows):
713 if i < len(list):
714 result = result + format(list[i]) + '<br>\n'
715 result = result + '</td>'
716 return '<table><tr>%s</tr></table>' % result
717
718 def grey(self, text): return '<span class="grey">%s</span>' % text
719

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 2

lenFunction · 0.85
formatFunction · 0.70

Tested by

no test coverage detected