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

Function create_formatter

Solutions/3_7/tableformat.py:50–59  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

48 print('</tr>')
49
50def create_formatter(name):
51 if name == 'text':
52 formatter = TextTableFormatter
53 elif name == 'csv':
54 formatter = CSVTableFormatter
55 elif name == 'html':
56 formatter = HTMLTableFormatter
57 else:
58 raise RuntimeError('Unknown format %s' % name)
59 return formatter()
60
61
62

Callers 1

stock.pyFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected