[issue20423] io.StringIO newline param has wrong default

2014-02-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: The docs are now fixed, thank you! -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker _

[issue20423] io.StringIO newline param has wrong default

2014-02-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset 82cfab2ad98d by Antoine Pitrou in branch '3.3': Issue #20423: fix documentation of io.StringIO's newline parameter http://hg.python.org/cpython/rev/82cfab2ad98d New changeset 69a2cc048c80 by Antoine Pitrou in branch '2.7': Issue #20423: fix document

[issue20423] io.StringIO newline param has wrong default

2014-01-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Using '\n' as default is normal: StringIOs are not stored on disk so there's no point in converting newlines by default (it's only slower while not improving interoperability). '\n' is the default line separator in Python. So we should just fix the docs here.

[issue20423] io.StringIO newline param has wrong default

2014-01-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: 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\ng

[issue20423] io.StringIO newline param has wrong default

2014-01-28 Thread couplewavylines
couplewavylines added the comment: Serhiy, you're right, I now see the default behavior is "newline='\n'". So, the header is still wrong, and the text is "The default is to do no newline translation" may be incorrect too? Or just unclear (to me anyway)? -- ___

[issue20423] io.StringIO newline param has wrong default

2014-01-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: No, actual default is '\n'. >>> io.StringIO('abc\r\ndef\nghi\rklm').readlines() ['abc\r\n', 'def\n', 'ghi\rklm'] >>> io.StringIO('abc\r\ndef\nghi\rklm', newline=None).readlines() ['abc\n', 'def\n', 'ghi\n', 'klm'] >>> io.StringIO('abc\r\ndef\nghi\rklm', newlin

[issue20423] io.StringIO newline param has wrong default

2014-01-28 Thread couplewavylines
Changes by couplewavylines : Added file: http://bugs.python.org/file33780/no_translation_output.txt ___ Python tracker ___ ___ Python-bugs-lis

[issue20423] io.StringIO newline param has wrong default

2014-01-28 Thread couplewavylines
New submission from couplewavylines: In io.StringIO, the newline argument's default is currently documented as "newline=None" in the section header. However, it's described this way: "The default is to do no newline translation." The behavior of io.StringIO is consistent with this descriptio