summaryrefslogtreecommitdiffstats
path: root/Lib/StringIO.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/StringIO.py')
-rw-r--r--Lib/StringIO.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/StringIO.py b/Lib/StringIO.py
index f35054e..9b79a88 100644
--- a/Lib/StringIO.py
+++ b/Lib/StringIO.py
@@ -178,8 +178,10 @@ class StringIO:
self.len = newpos
self.pos = newpos
- def writelines(self, list):
- self.write(''.join(list))
+ def writelines(self, iterable):
+ write = self.write
+ for line in iterable:
+ write(line)
def flush(self):
_complain_ifclosed(self.closed)