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

2010-04-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: I've updated the doc in r80591. Sorry for the inconvenience! -- resolution: -> invalid status: open -> closed ___ Python tracker ___ __

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

2010-04-28 Thread holger krekel
holger krekel 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

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

2010-04-28 Thread Antoine Pitrou
Antoine Pitrou 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

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

2010-04-28 Thread holger krekel
New submission from holger krekel : Running the attached file with python3.1.1 works fine, all assertions pass. Running it with 3.1.2 gives me this output: $ python3.1.2/bin/python3.1 stringio_fail.py Traceback (most recent call last): File "stringio_fail.py", line 12, in assert s == "