[issue1986] io.StringIO allows any parameter

Benjamin Peterson report at bugs.python.org
Tue Feb 26 00:33:23 CET 2008


Benjamin Peterson added the comment:

According to the docs: "When a StringIO object is created, it can be
initialized to an existing string by passing the string to the constructor."
So, it seems that that the docs are being too strict, or the code is
being too open. The conversion to str in the constructor is explicit, so
I'd favor leaving it be.

----------
nosy: +benjamin.peterson

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1986>
__________________________________


More information about the Python-bugs-list mailing list