Vito De Tullio <vito.detul...@gmail.com> added the comment:
My final goal is to preserve the empty lines - I think I can do some bash magic, but maybe something more complex that a simple sed call. FWIW on https://jsonlines.org/#line-separator-is-n I see "The last character in the file may be a line separator, and it will be treated the same as if there was no line separator present.". And on https://github.com/ndjson/ndjson-spec#32-parsing I see "The parser MAY silently ignore empty lines, e.g. \n\n. This behavior MUST be documented and SHOULD be configurable by the user of the parser.". While I get this choice can be "on a grey area", I think this is a known "dialect" of the jsonl specs. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue45929> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com