Message5951
The cStringIO module in CPython says:
# Close object and discard memory buffer --
# .getvalue() will now raise an exception
I was expecting this to happen in a little script but it did not raise an exception (not relying on it, just testing some things out)
In Jython 2.5.1 I close the StringIO object and it will still return the string buffer
Looking at the source it looks like all close() does is set a flag. In reality it should clear out the buffer to free the memory and raise an exception if getvalue() is called after close |
|
Date |
User |
Action |
Args |
2010-08-11 17:50:47 | bpedman | set | recipients:
+ bpedman |
2010-08-11 17:50:47 | bpedman | set | messageid: <1281549047.41.0.0170662342871.issue1640@psf.upfronthosting.co.za> |
2010-08-11 17:50:46 | bpedman | link | issue1640 messages |
2010-08-11 17:50:46 | bpedman | create | |
|