[issue29405] improve csv.Sniffer().sniff() behavior

Milt Epstein report at bugs.python.org
Sat Feb 4 02:33:35 EST 2017


Milt Epstein added the comment:

That's right, with 11 lines in the sample data, total will become 20 on the second iteration.  And that throws off some of the computations done in that function.

Your patch looks good, in that it will achieve what I'm requesting.  But :-), your pointing out that other redundant min() made me take a closer look at the code, and led me to produce the attached patch as an alternate suggestion.  I think it makes the code a bit more sensible and cleaner.  Please review, and go with what you think best.

Thanks.

----------
Added file: http://bugs.python.org/file46512/csv.py.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29405>
_______________________________________


More information about the Python-bugs-list mailing list