[Python-ideas] csv.DictReader could handle headers more intelligently.

Eric V. Smith eric at trueblade.com
Tue Jan 29 21:59:42 CET 2013


On 1/29/2013 3:37 PM, Stephen J. Turnbull wrote:
> Eric V. Smith writes:
> 
>  > True. But my point stands: it's possible to read the data (even with a
>  > DictReader), do something with the data, and not know the column names
>  > in advance. It's not an impossible use case.
> 
> But it is.  Dicts don't guarantee iteration order, so you will most
> likely get an output file that not only has a different delimiter, but
> a different order of fields.

We're going to have to agree to disagree. Order is not always important.

-- 
Eric.



More information about the Python-ideas mailing list