[New-bugs-announce] [issue20435] Discrepancy between io.StringIO and _pyio.StringIO with univeral newlines

Serhiy Storchaka report at bugs.python.org
Wed Jan 29 10:16:06 CET 2014


New submission from Serhiy Storchaka:

>>> import io, _pyio
>>> io.StringIO('a\nb\r\nc\rd', newline=None)
<_io.StringIO object at 0xb707c734>
>>> io.StringIO('a\nb\r\nc\rd', newline=None).getvalue()
'a\nb\nc\nd'
>>> _pyio.StringIO('a\nb\r\nc\rd', newline=None).getvalue()
'a\nb\r\nc\rd'
>>> s = io.StringIO(newline=None); s.write('a\nb\r\nc\rd'); s.getvalue()
8
'a\nb\nc\nd'
>>> s = _pyio.StringIO(newline=None); s.write('a\nb\r\nc\rd'); s.getvalue()
8
'a\nb\r\nc\rd'

----------
components: IO
messages: 209625
nosy: benjamin.peterson, hynek, pitrou, serhiy.storchaka, stutzbach
priority: normal
severity: normal
status: open
title: Discrepancy between io.StringIO and _pyio.StringIO with univeral newlines
type: behavior
versions: Python 2.7, Python 3.3, Python 3.4

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


More information about the New-bugs-announce mailing list