Martin v. Löwis <mar...@v.loewis.de> added the comment: It would be interesting to see how often the "bad" case triggers, i.e. that a write-only stringio sees any of the other methods invoked at all. As a special case, you may consider that .truncate(0) doesn't really need to realize the buffer first.
I also wonder how much StringIO will be used in praxis, as opposed to BytesIO. ---------- nosy: +loewis _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue13149> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com