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 <[email protected]>
<http://bugs.python.org/issue19215>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com