This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author exarkun
Recipients exarkun
Date 2009-11-18.19:01:52
SpamBayes Score 1.1232759e-05
Marked as misclassified No
Message-id <1258570914.64.0.211682819163.issue7349@psf.upfronthosting.co.za>
In-reply-to
Content
The actual file type rejects None in places like as the argument to read
or readlines.  StringIO.StringIO, io.BytesIO, and io.StringIO all accept
None to mean the same as passing no argument at all.

This makes it tricky to write code that might operate on any of these
types (as many APIs accepting a "file-like object" try to).  Testing
with one will not demonstrate that code works with any.  In particular,
it's common to start test with StringIO, which is more liberal, and only
discover a problem when code is run for real against an actual file.
History
Date User Action Args
2009-11-18 19:01:54exarkunsetrecipients: + exarkun
2009-11-18 19:01:54exarkunsetmessageid: <1258570914.64.0.211682819163.issue7349@psf.upfronthosting.co.za>
2009-11-18 19:01:53exarkunlinkissue7349 messages
2009-11-18 19:01:52exarkuncreate