[issue1286] fileinput, StringIO, and cStringIO do not support the with protocol
Wade Tattersall
report at bugs.python.org
Sun Nov 25 05:52:27 CET 2012
Wade Tattersall added the comment:
Any chance this patch could be applied to version 2.7? It's still an issue in 2.7.3, even though a suitable patch was supplied 3 years ago.
I understand that it's fixed in python3, but for us poor maintainers of ancient code, it would be convenient to be able to do things like
with StringIO() as test:
test.write("hi!")
return test.getvalue()
----------
nosy: +Wade.Tattersall
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1286>
_______________________________________
More information about the Python-bugs-list
mailing list