diff options
author | Tim Peters <tim.peters@gmail.com> | 2004-08-21 06:55:43 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2004-08-21 06:55:43 (GMT) |
commit | 037b3ee44e7de00b4653d73d4808c0f679a909a7 (patch) | |
tree | 88ecf25c35a355258bb869acab244cc1b48b4466 /Misc | |
parent | 7109b287cf84cebdfa99b2b0a657d55f6e481be7 (diff) | |
download | cpython-037b3ee44e7de00b4653d73d4808c0f679a909a7.zip cpython-037b3ee44e7de00b4653d73d4808c0f679a909a7.tar.gz cpython-037b3ee44e7de00b4653d73d4808c0f679a909a7.tar.bz2 |
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.
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -41,6 +41,11 @@ Core and builtins Extension modules ----------------- +- Patch 1012740: truncate() on a writeable cStringIO now resets the + position to the end of the stream. This is consistent with the original + StringIO module and avoids inadvertently resurrecting data that was + supposed to have been truncated away. + - Added socket.socketpair(). Library @@ -59,7 +64,7 @@ Library - A new function tkFont.nametofont was added to return an existing font. The Font class constructor now has an additional exists argument which, if True, requests to return/configure an existing font, rather - than creating a new one. + than creating a new one. - Updated the decimal package's min() and max() methods to match the latest revision of the General Decimal Arithmetic Specification. |