New submission from Jean-Paul Calderone <[email protected]>:
cStringIO and file both accept -1 to readline to mean the same thing as
not passing any argument at all. StringIO, on the other hand, gets
totally confused:
>>> from StringIO import StringIO
>>> StringIO('a\nb\nfoo').readline(-1)
'a\nb\nfo'
>>>
----------
components: Library (Lib)
messages: 95438
nosy: exarkun
severity: normal
status: open
title: StringIO.StringIO.readline(-1) returns the wrong result compared to
other file-like objects
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue7348>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com