diff options
author | Georg Brandl <georg@python.org> | 2007-12-02 09:40:06 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2007-12-02 09:40:06 (GMT) |
commit | 1a3284ed69d545e4ef59869998cb8c29233a45fa (patch) | |
tree | 98728a9b7aae6188ee8124160007a9d5c5277f8c /Lib/gzip.py | |
parent | 87f9c53937ce47f55851ac7c71a94e46cf9142bf (diff) | |
download | cpython-1a3284ed69d545e4ef59869998cb8c29233a45fa.zip cpython-1a3284ed69d545e4ef59869998cb8c29233a45fa.tar.gz cpython-1a3284ed69d545e4ef59869998cb8c29233a45fa.tar.bz2 |
#1535: rename __builtin__ module to builtins.
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) |