[issue18291] codecs.open interprets FS, RS, GS as line ends

Neil Schemenauer report at bugs.python.org
Fri Oct 5 02:09:20 EDT 2018


Neil Schemenauer <nas-python at arctrix.com> added the comment:

I just found bug #22232 myself but thanks for pointing it out.

> changing the behavior unconditionally is not an option

At this point, I disagree.  If I do a search on the web, lots of pages referring to str.splitlines() seem it imply that is splits only on \r and \n.  For Python 2 that was correct.  I think most people would be surprised by the Python 3 behaviour.

I looked through the Python stdlib and marked any place str.splitlines() was used.  I have more research to do yet but I think nearly all of these cases will work better (or perhaps correctly) if str.splitlines is changed.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue18291>
_______________________________________


More information about the Python-bugs-list mailing list