[issue7348] StringIO.StringIO.readline(-1) returns the wrong result compared to other file-like objects

2009-12-13 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: Fixed in r76798. -- nosy: +benjamin.peterson resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7348

[issue7348] StringIO.StringIO.readline(-1) returns the wrong result compared to other file-like objects

2009-11-20 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: You specified neither version nor system. On 3.1, Windows from io import StringIO as s s('a\nb\nfoo').readline(-1) 'a\n' which, I gather, is what you describe as expected, although using -1 to mean None is rather weird. The 3.1 doc says

[issue7348] StringIO.StringIO.readline(-1) returns the wrong result compared to other file-like objects

2009-11-20 Thread Jean-Paul Calderone
Jean-Paul Calderone exar...@divmod.com added the comment: Python 2.6, Linux. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7348 ___ ___

[issue7348] StringIO.StringIO.readline(-1) returns the wrong result compared to other file-like objects

2009-11-18 Thread Jean-Paul Calderone
New submission from Jean-Paul Calderone exar...@divmod.com: 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)