[Python-ideas] csv.DictReader could handle headers more intelligently.
Yuval Greenfield
ubershmekel at gmail.com
Wed Jan 23 18:26:07 CET 2013
On Wed, Jan 23, 2013 at 7:15 PM, Antoine Pitrou <solipsis at pitrou.net> wrote:
> It's still rather surprising (and, in many cases, undesired). I would
> suggest adding a parameter to DictReader to raise an exception when
> there are duplicate column headers.
>
> Regards
>
> Antoine.
>
>
Completely agree, it's a big surprise and a quiet bug.
This is one of those changes we should remember for python 4.0. Until 4.0,
give an option to raise an exception upon duplicates. After 4.0 throw an
exception on duplicate headers by default with an option to ignore them.
Yuval
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20130123/f2df8de9/attachment.html>
More information about the Python-ideas
mailing list