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

Mark Lawrence breamoreboy at yahoo.co.uk
Tue Jan 29 18:38:50 CET 2013


On 29/01/2013 12:30, Mark Hackett wrote:

On Tuesday 29 Jan 2013, Steven D'Aprano wrote:

On 29/01/13 04:45, Mark Hackett wrote:

On Monday 28 Jan 2013, MRAB wrote:

It shouldn't silently drop the columns

Why not? It's adding to a dictionary and adding a duplicate key replaces the earlier one. Then adding to a dictionary was a mistake. I agree. So don't use DictReader in that case. We have Oscar with the method to do your own (and looked fairly simple and straightforward). Chris with carefuldictreader. Shane with his dual-retention object.

Please can we also have a RemoveTheNullByteThatsPutAtheEndOfTheFileByBrainDeadMicrosoftMoney? :)

-- Cheers.

Mark Lawrence



More information about the Python-ideas mailing list