mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
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.
This commit is contained in:
parent
6ec099658a
commit
3e47f65e28
1 changed files with 5 additions and 0 deletions
|
@ -175,6 +175,11 @@ Core and builtins
|
||||||
Extension modules
|
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
|
- time.strftime() now checks that the values in its time tuple argument
|
||||||
are within the proper boundaries to prevent possible crashes from the
|
are within the proper boundaries to prevent possible crashes from the
|
||||||
platform's C library implementation of strftime(). Can possibly
|
platform's C library implementation of strftime(). Can possibly
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue