MCPcopy Create free account
hub / github.com/dabeaz-course/python-mastery / headings

Method headings

Solutions/3_6/tableformat.py:17–19  ·  view source on GitHub ↗
(self, headers)

Source from the content-addressed store, hash-verified

15
16class TextTableFormatter(TableFormatter):
17 def headings(self, headers):
18 print(' '.join('%10s' % h for h in headers))
19 print(('-'*10 + ' ')*len(headers))
20
21 def row(self, rowdata):
22 print(' '.join('%10s' % d for d in rowdata))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected