This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author arigo
Recipients
Date 2004-05-12.16:59:52
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
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.
History
Date User Action Args
2007-08-23 15:37:41adminlinkissue951915 messages
2007-08-23 15:37:41admincreate