[issue5265] StringIO can duplicate newlines in universal newlines mode

Alexandre Vassalotti report at bugs.python.org
Tue May 12 05:22:51 CEST 2009


Alexandre Vassalotti <alexandre at peadrop.com> added the comment:

The bug shouldn't affect 2.6 and 2.7 unless you backported the now
obsolete _stringio module from 3.0.

I tested 2.6 and 2.7 and as expected I didn't see the bug:

Python 2.6.2+ (release26-maint:72576, May 11 2009, 23:16:48) 
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import io
>>> io.StringIO('foo\r\nbar\r\n', newline=None).read()
u'foo\nbar\n'

----------

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


More information about the Python-bugs-list mailing list