mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-32035: Fix words about strings and bytes in zipfile documentation. (GH-10592)
This commit is contained in:
parent
7f4ba4afd4
commit
4bb186d7e2
2 changed files with 12 additions and 16 deletions
|
@ -402,7 +402,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)
|
||||
|
@ -1429,7 +1429,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()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue