]> granicus.if.org Git - python/commit
Patch 1012740: cStringIO's truncate doesn't
authorTim Peters <tim.peters@gmail.com>
Sat, 21 Aug 2004 06:55:43 +0000 (06:55 +0000)
committerTim Peters <tim.peters@gmail.com>
Sat, 21 Aug 2004 06:55:43 +0000 (06:55 +0000)
commit037b3ee44e7de00b4653d73d4808c0f679a909a7
tree88ecf25c35a355258bb869acab244cc1b48b4466
parent7109b287cf84cebdfa99b2b0a657d55f6e481be7
Patch 1012740:  cStringIO's truncate doesn't

truncate() left the stream position unchanged, which meant the
"truncated" data didn't go away:

>>> io.write('abc')
>>> io.truncate(0)
>>> io.write('xyz')
>>> io.getvalue()
'abcxyz'

Patch by Dima Dorfman.
Lib/test/test_StringIO.py
Misc/NEWS
Modules/cStringIO.c