Martin Panter <vadmium...@gmail.com> added the comment: The documentation <https://docs.python.org/dev/library/csv.html#module-contents> says you should “open the files with newline=''.” IMO this is an unfortunate quirk of the CSV module. Everything else that I know of in the Python built-in library either works with binary files, which typically do no newline translation in Python 3, or is fine with newline translation enabled in text mode. See also Issue 10954 about making the behaviour stricter.
---------- nosy: +martin.panter _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue36172> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com