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

Mark Hackett mark.hackett at metoffice.gov.uk
Mon Jan 28 18:13:52 CET 2013


On Monday 28 Jan 2013, Ethan Furman wrote:

On 01/28/2013 04:21 AM, Mark Hackett wrote: > On Friday 25 Jan 2013, Ethan Furman wrote: >> We're going to have to agree to disagree on this point -- I think there >> is a huge difference between reassigning a variable which is completely >> under your control from losing entire columns of data from a file which >> you may have never seen before. > > But if you've never seen it before, how do you know that you're going to > get a LIST in one column?

I don't, which is why an exception should be raised. Ethan

And there's an argument for that that I've agreed to before.

There's a counter that this will cause programs that used to work to fail.

Whether the pro is higher than the con or the other way round is what I question.

You, however, seem to believe this is a forgone conclusion.

And that's where I disagree.



More information about the Python-ideas mailing list