summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2004-03-08 18:22:35 (GMT)
committerRaymond Hettinger <python@rcn.com>2004-03-08 18:22:35 (GMT)
commit3e47f65e28e0350ebf5de83242fdc4099f69a60d (patch)
tree70ec1f984501795e64e7f04b255376b0f045c8e7 /Misc
parent6ec099658ab49ed6d3c2861e437fe659e1c7037f (diff)
downloadcpython-3e47f65e28e0350ebf5de83242fdc4099f69a60d.zip
cpython-3e47f65e28e0350ebf5de83242fdc4099f69a60d.tar.gz
cpython-3e47f65e28e0350ebf5de83242fdc4099f69a60d.tar.bz2
SF patch #907403: Improvements to cStringIO.writelines()
The writelines() method now accepts any iterable argument and writes the lines one at a time rather than using ''.join(lines) followed by a single write. Results in considerable memory savings and makes the method suitable for use with generator expressions.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS5
1 files changed, 5 insertions, 0 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index f3554c3..1fe8bf2 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -175,6 +175,11 @@ Core and builtins
Extension modules
-----------------
+- cStringIO.writelines() now accepts any iterable argument and writes
+ the lines one at a time rather than joining them and writing once.
+ Made a parallel change to StringIO.writelines(). Saves memory and
+ makes suitable for use with generator expressions.
+
- time.strftime() now checks that the values in its time tuple argument
are within the proper boundaries to prevent possible crashes from the
platform's C library implementation of strftime(). Can possibly