Issue #26039: Document ZipInfo.is_dir() and make force_zip64 keyword-only.
Patch by Thomas Kluyver.
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 @@
return zinfo
def is_dir(self):
+ """Return True if this archive member is a directory."""
return self.filename[-1] == '/'
@@ -1343,7 +1344,7 @@
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