Eric V. Smith added the comment: My (poorly phrased) question really was: is resetting fieldnames documented to force a re-read of the column headers? I don't see that it is, so I'm going to call this a 3.5 enhancement request.
I agree with David that we can't change DictReader to inherit from object in 2.7 without risking some non-obvious failure. Who knows how people have derived from a DictReader, and what they're expecting to work? If we do want this feature added, I'm not sure resetting fieldnames to None is an obvious interface. Maybe a "reset_field_names(fieldnames=None)" method, or something like it, would make more sense. To accomplish this today, you can use various itertools functions to split up the input iterator and use two different DictReaders. ---------- type: -> enhancement versions: +Python 3.5 -Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue20004> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com