This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author skip.montanaro
Recipients andrei.avk, ejacq, rhettinger, skip.montanaro
Date 2021-06-29.11:50:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Thanks @andrei.avk. You are right, only the complex test is required.

I suppose it's okay to commit this, but reviewing the full code of the has_header method leaves me thinking this is just putting lipstick on a pig. If I read the code correctly, there are two (undocumented) tacit assumptions:

1. The non-header values are numeric.

2. If not numeric, they are fixed length strings whose length generally differs from the length of the putative header.

The second criterion means this has a header:


but this doesn't:


It seems to me that it would be a good idea to at least expand on the documentation of that method and maybe add at least one test case where the CSV sample doesn't have a header. I'll try to get that done and attach a patch.
Date User Action Args
2021-06-29 11:50:13skip.montanarosetrecipients: + skip.montanaro, rhettinger, andrei.avk, ejacq
2021-06-29 11:50:13skip.montanarosetmessageid: <>
2021-06-29 11:50:13skip.montanarolinkissue43625 messages
2021-06-29 11:50:13skip.montanarocreate