summaryrefslogtreecommitdiffstats
path: root/Lib/zipfile.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2018-11-25 09:30:45 (GMT)
committerGitHub <noreply@github.com>2018-11-25 09:30:45 (GMT)
commitaf009fbcdb00fffced653792eb7af6b72f2521e3 (patch)
treebaeb70def9e2440b90190082a01d4de106345d42 /Lib/zipfile.py
parent8c70c08f0fb5795904442e95a2987ea18aed2899 (diff)
downloadcpython-af009fbcdb00fffced653792eb7af6b72f2521e3.zip
cpython-af009fbcdb00fffced653792eb7af6b72f2521e3.tar.gz
cpython-af009fbcdb00fffced653792eb7af6b72f2521e3.tar.bz2
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>
Diffstat (limited to 'Lib/zipfile.py')
-rw-r--r--Lib/zipfile.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/zipfile.py b/Lib/zipfile.py
index 5bb3587..edde0c5 100644
--- a/Lib/zipfile.py
+++ b/Lib/zipfile.py
@@ -405,7 +405,7 @@ class ZipInfo (object):
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)
@@ -1333,7 +1333,7 @@ class ZipFile:
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()