mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +00:00
bpo-43787: Add __iter__ to GzipFile, BZ2File, and LZMAFile (GH-25353)
This commit is contained in:
parent
d9151cb453
commit
d2a8e69c2c
4 changed files with 15 additions and 0 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue