Message89803
Here's an example of the behaviour:
import io
def test(buf):
textio = io.TextIOWrapper(buf)
buf = io.BytesIO()
test(buf)
print(buf.closed) # This prints True currently
The problem here is TextIOWrapper closes its buffer when deleted.
BufferedRWPair behalves similarly. The solution is simply to override
the __del__ method of TextIOWrapper inherited from IOBase. |
|
Date |
User |
Action |
Args |
2009-06-29 00:49:53 | alexandre.vassalotti | set | recipients:
+ alexandre.vassalotti |
2009-06-29 00:49:52 | alexandre.vassalotti | set | messageid: <1246236592.97.0.944471121329.issue6361@psf.upfronthosting.co.za> |
2009-06-29 00:49:51 | alexandre.vassalotti | link | issue6361 messages |
2009-06-29 00:49:51 | alexandre.vassalotti | create | |
|