Message129314
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)
'' |
|
Date |
User |
Action |
Args |
2011-02-24 21:32:23 | scop | set | recipients:
+ scop |
2011-02-24 21:32:22 | scop | set | messageid: <1298583142.96.0.124636829869.issue11311@psf.upfronthosting.co.za> |
2011-02-24 21:32:21 | scop | link | issue11311 messages |
2011-02-24 21:32:21 | scop | create | |
|