New submission from Ville Skyttä <ville.sky...@iki.fi>: Python 2.7 (r27:82500, Sep 16 2010, 18:02:00) [GCC 4.5.1 20100907 (Red Hat 4.5.1-3)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import StringIO >>> StringIO.StringIO("foo").readline(0) 'foo'
I don't think this is the correct behavior, or at least it is not consistent with other file objects' readline() which return an empty string with .readline(0). For example: >>> import cStringIO >>> cStringIO.StringIO("foo").readline(0) '' ...or: >>> file("/usr/bin/python").readline(0) '' ---------- components: Library (Lib) messages: 129314 nosy: scop priority: normal severity: normal status: open title: StringIO.readline(0) returns incorrect results type: behavior versions: Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue11311> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com