• Tim Peters's avatar
    Patch 1012740: cStringIO's truncate doesn't · 037b3ee4
    Tim Peters yazdı
    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.
    037b3ee4
cStringIO.c 19.2 KB