Issue 792558: csv.DictReader parms inconsistent with docs (original) (raw)
To conform with the documentation, csv.DictReader (and possibly DictWriter) should accept keyword arguments to specify a dialect on the fly and forward them to its reader instance:
class DictReader: def init(self, f, fieldnames, restkey=None, restval=None, dialect="excel", *args, **kwd): self.fieldnames = fieldnames # list of keys for the dict self.restkey = restkey # key to catch long rows self.restval = restval # default value for short rows self.reader = reader(f, dialect, *args, **kwd)