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

Class DictCSVParser

Solutions/3_7/reader.py:22–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20 pass
21
22class DictCSVParser(CSVParser):
23 def __init__(self, types):
24 self.types = types
25
26 def make_record(self, headers, row):
27 return { name: func(val) for name, func, val in zip(headers, self.types, row) }
28
29class InstanceCSVParser(CSVParser):
30 def __init__(self, cls):

Callers 1

read_csv_as_dictsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected