Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:
If change the default behavior we need to wait several releases after adding this option. Users should be able to pick the current behavior explicitly. Currently the workaround is using regular expressions. For s.splitlines(keepends=False): re.split(r'\n|\r\n?', s) For s.splitlines(keepends=True): re.split(r'(?<=\n)|(?<=\r)(?!\n)', s) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue22232> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com