Lines Matching full:fieldnames
74 def __init__(self, f, fieldnames=None, restkey=None, restval=None,
76 self._fieldnames = fieldnames # list of keys for the dict
87 def fieldnames(self):
96 @fieldnames.setter
97 def fieldnames(self, value):
103 self.fieldnames
112 d = dict(zip(self.fieldnames, row))
113 lf = len(self.fieldnames)
118 for key in self.fieldnames[lr:]:
124 def __init__(self, f, fieldnames, restval="", extrasaction="raise",
126 self.fieldnames = fieldnames # list of keys for the dict
136 header = dict(zip(self.fieldnames, self.fieldnames))
141 wrong_fields = [k for k in rowdict if k not in self.fieldnames]
143 raise ValueError("dict contains fields not in fieldnames: " +
145 return [rowdict.get(key, self.restval) for key in self.fieldnames]