aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/StringIO.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/StringIO.py')
-rw-r--r--Lib/StringIO.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/StringIO.py b/Lib/StringIO.py
index 2aef3c329e1..cb7313d42a9 100644
--- a/Lib/StringIO.py
+++ b/Lib/StringIO.py
@@ -45,6 +45,9 @@ class StringIO:
self.closed = 0
self.softspace = 0
+ def __iter__(self):
+ return iter(self.readline, '')
+
def close(self):
if not self.closed:
self.closed = 1