csv.DictReader line skipping should be considered a bug?

Steve D'Aprano steve+python at pearwood.info
Wed Dec 6 02:49:23 EST 2017


On Wed, 6 Dec 2017 11:43 am, MRAB wrote:

> A blank line could be a record if there's only one field and it's empty.


That's technically correct, but if you have only one field, its barely a CSV
file at all.

Given that CSV technically requires at least two fields (in order to have a
separator between fields) I'm not too concerned by the inability to represent
a record consisting of only a single blank field. If there was an actual CSV
standard (rather than just a collection of implementations with slightly
different behaviour) I'd be more concerned at this design lack.



-- 
Steve
“Cheer up,” they said, “things could be worse.” So I cheered up, and sure
enough, things got worse.




More information about the Python-list mailing list