summaryrefslogtreecommitdiffstats
path: root/Lib/gzip.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/gzip.py')
-rw-r--r--Lib/gzip.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/gzip.py b/Lib/gzip.py
index 0a8993b..9a4e0f9 100644
--- a/Lib/gzip.py
+++ b/Lib/gzip.py
@@ -398,6 +398,10 @@ class GzipFile(_compression.BaseStream):
self._check_not_closed()
return self._buffer.readline(size)
+ def __iter__(self):
+ self._check_not_closed()
+ return self._buffer.__iter__()
+
class _GzipReader(_compression.DecompressReader):
def __init__(self, fp):