diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-05-15 09:27:16 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-05-15 09:27:16 (GMT) |
commit | f47fc5553be1945d4d3ca1386c523fcf2ed28cef (patch) | |
tree | a09ec8309ad9c60c4f8f12c5bf5a7c9e54a15794 /Lib/zipfile.py | |
parent | 3d3f7e8b41a8b1f47e40aed5696413b167166998 (diff) | |
download | cpython-f47fc5553be1945d4d3ca1386c523fcf2ed28cef.zip cpython-f47fc5553be1945d4d3ca1386c523fcf2ed28cef.tar.gz cpython-f47fc5553be1945d4d3ca1386c523fcf2ed28cef.tar.bz2 |
Issue #26039: Document ZipInfo.is_dir() and make force_zip64 keyword-only.
Patch by Thomas Kluyver.
Diffstat (limited to 'Lib/zipfile.py')
-rw-r--r-- | Lib/zipfile.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/zipfile.py b/Lib/zipfile.py index 03dead5..27a4c71 100644 --- a/Lib/zipfile.py +++ b/Lib/zipfile.py @@ -502,6 +502,7 @@ class ZipInfo (object): return zinfo def is_dir(self): + """Return True if this archive member is a directory.""" return self.filename[-1] == '/' @@ -1343,7 +1344,7 @@ class ZipFile: with self.open(name, "r", pwd) as fp: return fp.read() - def open(self, name, mode="r", pwd=None, force_zip64=False): + def open(self, name, mode="r", pwd=None, *, force_zip64=False): """Return file-like object for 'name'. name is a string for the file name within the ZIP file, or a ZipInfo |