Message45964
Logged In: YES
user_id=4771
David, it seems to me that f.truncate(huge_value) would incorrectly set f.len to huge_value with your patch. Here is another patch fixing this and the other details I mentioned. I also put the new test into test_StringIO.py instead. Perhaps we should remove the if __name__=='__main__' bit, although it is nice as a quick example.
This makes me wonder if there is any reason left for which cStringIOs aren't subclassable, or if we care.
Alternatively, it makes me wonder if there wouldn't be a more efficient implementation of StringIO.py that would entierely avoid concatenating large strings, or if we care. This might make StringIO at least as efficient as cStringIO for some cases, e.g. when writing a lot of strings a few kb each, by avoiding the copy overhead. |
|
Date |
User |
Action |
Args |
2007-08-23 15:37:41 | admin | link | issue951915 messages |
2007-08-23 15:37:41 | admin | create | |
|