Guido van Rossum added the comment:

Agreed we shouldn't change this. It looks like the behavior is consistent if 
you consider `a = StringIO(stuff, newline=...)` merely a shorthand for `a = 
StringIO(newline=...); a.write(stuff)`.

I understand you would like to have a way to set the internal buffer directly, 
without newline translation; to support that we'd have to add a new argument. 
Although really, it's probably better to just do the \r\n translation in your 
app anyway.

You're very unlikely to ever need \r translation -- that was last seen on MacOS 
9, which has been dead for 14 years now. Fighting \r\n or pretending it's a 
Windows-only thing is pretty hopeless -- most text-based internet protocols 
(like HTTP) require it.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22413>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to