bpo-32035: Fix words about strings and bytes in zipfile documentation. (GH-10592)
(cherry picked from commit 4bb186d7e253ad4def875305e06690181e923dfd)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
diff --git a/Lib/zipfile.py b/Lib/zipfile.py
index a438785..d2d3b69 100644
--- a/Lib/zipfile.py
+++ b/Lib/zipfile.py
@@ -402,7 +402,7 @@
return ''.join(result)
def FileHeader(self, zip64=None):
- """Return the per-file header as a string."""
+ """Return the per-file header as a bytes object."""
dt = self.date_time
dosdate = (dt[0] - 1980) << 9 | dt[1] << 5 | dt[2]
dostime = dt[3] << 11 | dt[4] << 5 | (dt[5] // 2)
@@ -1424,7 +1424,7 @@
self._didModify = True
def read(self, name, pwd=None):
- """Return file bytes (as a string) for name."""
+ """Return file bytes for name."""
with self.open(name, "r", pwd) as fp:
return fp.read()