[issue22413] Bizarre StringIO(newline="\r\n") translation

Antoine Pitrou report at bugs.python.org
Sun Sep 27 21:04:27 CEST 2015


Antoine Pitrou added the comment:

At this point in time, I don't think it's a good idea to change the semantics at all. Some people might unknowingly rely on the current semantics, and the consequences of a change in 3.6 might be hard to debug.

The larger issue here is that the newline translation layer is meant as an adaptation layer between Python (where a newline is always "\n") and the outside world (where newlines are system-dependent or even file-dependent). But what is the "outside world" with StringIO? The data always comes from and goes to Python. So there is no obviously right decision except, perhaps, the decision not to have newline translation at all.

So I'd just recommend closing this as won't fix.

----------
nosy: +gvanrossum

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22413>
_______________________________________


More information about the Python-bugs-list mailing list