MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / multicolumn

Method multicolumn

tools/python-3.11.9-amd64/Lib/pydoc.py:642–652  ·  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

640 ' ', '&nbsp;', '\n', '<br>\n')
641
642 def multicolumn(self, list, format):
643 """Format a list of items into a multi-column list."""
644 result = ''
645 rows = (len(list) + 3) // 4
646 for col in range(4):
647 result = result + '<td class="multicolumn">'
648 for i in range(rows*col, rows*col+rows):
649 if i < len(list):
650 result = result + format(list[i]) + '<br>\n'
651 result = result + '</td>'
652 return '<table><tr>%s</tr></table>' % result
653
654 def grey(self, text): return '<span class="grey">%s</span>' % text
655

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.70

Tested by

no test coverage detected