[Python-ideas] csv.DictReader could handle headers more intelligently.
Mark Hackett
mark.hackett at metoffice.gov.uk
Thu Jan 24 11:41:41 CET 2013
On Wednesday 23 Jan 2013, J. Cliff Dyer wrote:
>
> Moreover, I think while it might be expected for a dict to do this, it
> does not follow that a DictReader should be expected to silently throw
> away the user's data.
> Cheers,
> Cliff
>
>
Cliff, the name of the routine is "DictReader".
It is a very big hint.
Like I said, the situation here is putting formatting expectations on the file
being read in.
It's pretty identical with sockets or threading libraries in python. If you
want a specific action done that isn't "normal" for just "make one of them",
you put policy on it as a decoration. But if you wanted some specific action
and don't use the decorator to do so, you don't get an error, you get what you
get without the decorator.
>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> http://mail.python.org/mailman/listinfo/python-ideas
>
More information about the Python-ideas
mailing list