[New-bugs-announce] [issue1029] py3k: io.StringIO.getvalue() returns \r\n

Amaury Forgeot d'Arc report at bugs.python.org
Mon Aug 27 00:04:04 CEST 2007

New submission from Amaury Forgeot d'Arc:

io.StrinIO.getvalue() correctly decodes bytes from the underlying
buffer, but does not translate \r\n to \n.

Python 3.0x (py3k, Aug 26 2007, 14:39:16) [MSC v.1400 32 bit (Intel)] on
Type "help", "copyright", "credits" or "license" for more information.
>>> import io
>>> a = io.StringIO()
>>> a.write('\n')
>>> a.getvalue()

The attached patch corrects this and adds a test.

components: Library (Lib), Windows
files: stringio.diff
messages: 55314
nosy: amaury.forgeotdarc
severity: normal
status: open
title: py3k: io.StringIO.getvalue() returns \r\n
type: behavior
versions: Python 3.0

Tracker <report at bugs.python.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stringio.diff
Type: application/octet-stream
Size: 1013 bytes
Desc: not available
Url : http://mail.python.org/pipermail/new-bugs-announce/attachments/20070826/ccb5c883/attachment-0001.obj 

More information about the New-bugs-announce mailing list