[Python-ideas] csv.DictReader could handle headers more intelligently. (original) (raw)

Bruce Leban bruce at leapyear.org
Tue Jan 29 01:01:56 CET 2013


The reader could return a multidict. If you know it's a multidict you an access the 'discarded' values. Otherwise, it appears just like the dict that we have today. A middle ground between people that don't want the interface changed and those who want to get the multiple values. Personally, I prefer code that raises exceptions when it gets unreasonable input, and I think duplicate field names qualifies. But if that's the the general sentiment than a multidict is a potential compromise.

--- Bruce Follow me: http://www.twitter.com/Vroo http://www.vroospeak.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-ideas/attachments/20130128/353bfaf2/attachment.html>



More information about the Python-ideas mailing list