R. David Murray <rdmur...@bitdance.com> added the comment: Thanks for working on this.
Comments on patch: (1) I think you should retain the full "ugly check" comment explaining how the \r\n spanning a buffer is handled. I think that's a helpful explanation for a non-obvious piece of code. (2) Your code for setting the newlines attributes and the tests for it look wrong to me. The attribute is supposed to list all separators seen. I think your code is going to set it to ('\r\n', '\r') when the separators are just '\r\n', and your test doesn't check to make sure newlines gets set to _only_ what was seen. (Nor does it check for the case of actual mixed line endings...a test for which would require some additional test hackery since the existing test code didn't try to test mixed line end files either.) (3) Sorry for being dense, but I don't understand your code to adjust the number of bytes in the read method or the test that tests it. I haven't tried to play with it, but it looks odd to me that you'd be adding '2', since I would think that the read could cover more than one line...or am I misunderstanding how 'read(n)' works (which is entirely possible)? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue6759> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com