MCPcopy Index your code
hub / github.com/python/cpython / __init__

Method __init__

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

listClass · 0.85
readerFunction · 0.85

Tested by

no test coverage detected