diff options
Diffstat (limited to 'Lib/gzip.py')
-rw-r--r-- | Lib/gzip.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/gzip.py b/Lib/gzip.py index 4f750c0..a044087 100644 --- a/Lib/gzip.py +++ b/Lib/gzip.py @@ -7,7 +7,7 @@ but random access is not allowed.""" import struct, sys, time import zlib -import __builtin__ +import builtins __all__ = ["GzipFile","open"] @@ -92,7 +92,7 @@ class GzipFile: if mode and 'b' not in mode: mode += 'b' if fileobj is None: - fileobj = self.myfileobj = __builtin__.open(filename, mode or 'rb') + fileobj = self.myfileobj = builtins.open(filename, mode or 'rb') if filename is None: if hasattr(fileobj, 'name'): filename = fileobj.name else: filename = '' @@ -487,13 +487,13 @@ def _test(): print("filename doesn't end in .gz:", repr(arg)) continue f = open(arg, "rb") - g = __builtin__.open(arg[:-3], "wb") + g = builtins.open(arg[:-3], "wb") else: if arg == "-": f = sys.stdin g = GzipFile(filename="", mode="wb", fileobj=sys.stdout) else: - f = __builtin__.open(arg, "rb") + f = builtins.open(arg, "rb") g = open(arg + ".gz", "wb") while True: chunk = f.read(1024) |