Martin Panter added the comment: There were a few tricky bits doing this with _pyio.StringIO, but I think I was successful. Here is a patch with both implementations and some tests. If people think this should go ahead, I can add documentation.
In the process I may have discovered a bug with the TextIOWrapper implementations. Is calling truncate() meant to truncate the internal read buffer? At the moment you can read back truncated data, although the underlying byte stream is actually truncated. ---------- keywords: +patch Added file: http://bugs.python.org/file41313/stringio-seek.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25190> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com