[issue19215] StringIO.StringIO('foo').readline(0) == 'foo'

Zdeněk Pavlas report at bugs.python.org
Thu Oct 10 11:57:59 CEST 2013


New submission from Zdeněk Pavlas:

The behavior contradicts documentation and is inconsistent with both cStringIO and File objects.  Patch attached.

>>> StringIO.StringIO('foo').readline(0)
'foo'
>>> cStringIO.StringIO('foo').readline(0)
''
>>> open('/etc/passwd').readline(0)
''

----------
components: Library (Lib)
files: stringio.patch
keywords: patch
messages: 199376
nosy: Zdeněk.Pavlas
priority: normal
severity: normal
status: open
title: StringIO.StringIO('foo').readline(0) == 'foo'
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file32029/stringio.patch

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


More information about the Python-bugs-list mailing list