[issue8558] StringIO().truncate causes zero-bytes in getvalue()

Antoine Pitrou <pitrou@free.fr> added the comment: This is a last-minute API change. truncate() was modified not to change the file position anymore. We should probably document it more explicitly. See the following subthread in python-dev: http://mail.python.org/pipermail/python-dev/2009-September/092127.html ---------- assignee: -> docs@python components: +Documentation nosy: +docs@python, pitrou _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue8558> _______________________________________

holger krekel <holger.krekel@gmail.com> added the comment: Ah, thanks for the pointer. So indeed, for me truncate(0)+seek(0) works fine for all interpreters i care for (python2.4 - 3.1.X), previously truncate(0) was enough. ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue8558> _______________________________________

holger krekel <holger.krekel@gmail.com> added the comment: Ah, thanks for the pointer. So indeed, for me truncate(0)+seek(0) works fine for all interpreters i care for (python2.4 - 3.1.X), previously truncate(0) was enough. ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue8558> _______________________________________
participants (2)
-
Antoine Pitrou
-
holger krekel