[Python-checkins] python/dist/src/Lib StringIO.py,1.33,1.34
rhettinger at users.sourceforge.net
rhettinger at users.sourceforge.net
Mon Mar 8 13:17:33 EST 2004
- Previous message: [Python-checkins] python/dist/src/Lib/idlelib ClassBrowser.py, 1.7,
1.8 ColorDelegator.py, 1.12, 1.13 EditorWindow.py, 1.55,
1.56 NEWS.txt, 1.30, 1.31 PyShell.py, 1.86, 1.87 TreeWidget.py,
1.8, 1.9 config-highlight.def, 1.7, 1.8 configDialog.py, 1.56,
1.57 configHandler.py, 1.33, 1.34
- Next message: [Python-checkins] python/dist/src/Modules cStringIO.c,2.46,2.47
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13720/Lib
Modified Files:
StringIO.py
Log Message:
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.
Index: StringIO.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/StringIO.py,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** StringIO.py 12 Feb 2004 17:35:05 -0000 1.33
--- StringIO.py 8 Mar 2004 18:17:31 -0000 1.34
***************
*** 179,184 ****
self.pos = newpos
! def writelines(self, list):
! self.write(''.join(list))
def flush(self):
--- 179,186 ----
self.pos = newpos
! def writelines(self, iterable):
! write = self.write
! for line in iterable:
! write(line)
def flush(self):
- Previous message: [Python-checkins] python/dist/src/Lib/idlelib ClassBrowser.py, 1.7,
1.8 ColorDelegator.py, 1.12, 1.13 EditorWindow.py, 1.55,
1.56 NEWS.txt, 1.30, 1.31 PyShell.py, 1.86, 1.87 TreeWidget.py,
1.8, 1.9 config-highlight.def, 1.7, 1.8 configDialog.py, 1.56,
1.57 configHandler.py, 1.33, 1.34
- Next message: [Python-checkins] python/dist/src/Modules cStringIO.c,2.46,2.47
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Python-checkins
mailing list