Message209581
On other hand, may be the behavior of io.StringIO is wrong. Because it is different from io.TextIOWrapper.
>>> io.TextIOWrapper(io.BytesIO(b'abc\r\ndef\nghi\rklm')).readlines()
['abc\n', 'def\n', 'ghi\n', 'klm']
>>> io.TextIOWrapper(io.BytesIO(b'abc\r\ndef\nghi\rklm'), newline=None).readlines()
['abc\n', 'def\n', 'ghi\n', 'klm']
>>> io.TextIOWrapper(io.BytesIO(b'abc\r\ndef\nghi\rklm'), newline='').readlines()
['abc\r\n', 'def\n', 'ghi\r', 'klm']
>>> io.TextIOWrapper(io.BytesIO(b'abc\r\ndef\nghi\rklm'), newline='\n').readlines()
['abc\r\n', 'def\n', 'ghi\rklm']
>>> io.TextIOWrapper(io.BytesIO(b'abc\r\ndef\nghi\rklm'), newline='\r').readlines()
['abc\r', '\ndef\nghi\r', 'klm']
>>> io.TextIOWrapper(io.BytesIO(b'abc\r\ndef\nghi\rklm'), newline='\r\n').readlines()
['abc\r\n', 'def\nghi\rklm'] |
|
Date |
User |
Action |
Args |
2014-01-28 19:51:04 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, pitrou, benjamin.peterson, stutzbach, docs@python, hynek, couplewavylines |
2014-01-28 19:51:04 | serhiy.storchaka | set | messageid: <1390938664.94.0.197345244035.issue20423@psf.upfronthosting.co.za> |
2014-01-28 19:51:04 | serhiy.storchaka | link | issue20423 messages |
2014-01-28 19:51:04 | serhiy.storchaka | create | |
|