commit | d2a8e69c2c605fbaa3656a5f99aa8d295f74c80e | [log] [tgz] |
---|---|---|
author | Inada Naoki <songofacandy@gmail.com> | Tue Apr 13 13:51:49 2021 +0900 |
committer | GitHub <noreply@github.com> | Tue Apr 13 13:51:49 2021 +0900 |
tree | 1f9874eec667494b36e238bb416fb133450b0f64 | |
parent | d9151cb45371836d39b6d53afb50c5bcd353c661 [diff] [blame] |
bpo-43787: Add __iter__ to GzipFile, BZ2File, and LZMAFile (GH-25353)
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 @@ def readline(self, size=-1): 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):