[issue19449] csv.DictWriter can't handle extra non-string fields

2013-10-30 Thread Tomas Grahn
New submission from Tomas Grahn: When csv.DictWriter.writerow is fed a dict with extra fieldnames (and extrasaction='raise') and any of those extra fieldnames aren't strings, a TypeError-exception is thrown. To fix the issue; in csv.py, edit the line: raise ValueError(dict contains fields

[issue19449] csv.DictWriter can't handle extra non-string fields

2013-10-30 Thread Tomas Grahn
Tomas Grahn added the comment: If non-string field names aren't allowed then shouldn't they be caught at an earlier stage, rather then when the user feeds writerow a dict with an unexpected key? But why should the field names have to be strings in the first place? Everything else is passed