[Python-ideas] Iterating non-newline-separated files should be easier

Chris Angelico rosuav at gmail.com
Sun Jul 20 01:51:26 CEST 2014


On Sun, Jul 20, 2014 at 9:49 AM, Nick Coghlan <ncoghlan at gmail.com> wrote:
> Adding a single possible newline character is a much simpler change, and one
> likely to have far fewer odd consequences. This is especially so if
> specifying NULL as the line separator is only permitted for files opened in
> binary mode.

U+0000 is a valid Unicode character, so I'd have no objection to, for
instance, splitting a UTF-8 encoded text file on \0.

ChrisA


More information about the Python-ideas mailing list