[issue18291] codecs.open interprets space as line ends

Serhiy Storchaka report at bugs.python.org
Mon Jul 1 11:41:45 CEST 2013


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 <report at bugs.python.org>
<http://bugs.python.org/issue18291>
_______________________________________


More information about the Python-bugs-list mailing list