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

Method __init__

Lib/csv.py:145–154  ·  view source on GitHub ↗
(self, f, fieldnames=None, restkey=None, restval=None,
                 dialect="excel", *args, **kwds)

Source from the content-addressed store, hash-verified

143
144class DictReader:
145 def __init__(self, f, fieldnames=None, restkey=None, restval=None,
146 dialect="excel", *args, **kwds):
147 if fieldnames is not None and iter(fieldnames) is fieldnames:
148 fieldnames = list(fieldnames)
149 self._fieldnames = fieldnames # list of keys for the dict
150 self.restkey = restkey # key to catch long rows
151 self.restval = restval # default value for short rows
152 self.reader = reader(f, dialect, *args, **kwds)
153 self.dialect = dialect
154 self.line_num = 0
155
156 def __iter__(self):
157 return self

Callers

nothing calls this directly

Calls 3

iterFunction · 0.85
listClass · 0.85
readerFunction · 0.85

Tested by

no test coverage detected