Serhiy Storchaka added the comment: In contrary to documentation str.splitlines() splits lines not only on '\n', '\r\n' and '\r'.
>>> 'a'.join(chr(i) for i in range(32)).splitlines(True) ['\x00a\x01a\x02a\x03a\x04a\x05a\x06a\x07a\x08a\ta\n', 'a\x0b', 'a\x0c', 'a\r', 'a\x0ea\x0fa\x10a\x11a\x12a\x13a\x14a\x15a\x16a\x17a\x18a\x19a\x1aa\x1ba\x1c', 'a\x1d', 'a\x1e', 'a\x1f'] ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue18291> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com