[issue1986] io.StringIO allows any parameter
Christian Heimes
report at bugs.python.org
Sun Feb 24 23:32:37 CET 2008
Christian Heimes added the comment:
In Python 2.x StringIO.StringIO calls str() on its arguments:
>>> StringIO.StringIO(1).read()
'1'
>>> StringIO.StringIO(object).read()
"<type 'object'>"
>>> str(object)
"<type 'object'>"
io.StringIO has the same behavior:
>>> io.StringIO(1).read()
'1'
>>> io.StringIO(object).read()
"<type 'object'>"
Georg, what's the bug here?
----------
nosy: +tiran
__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1986>
__________________________________
More information about the Python-bugs-list
mailing list