diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-01-26 11:45:39 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-01-26 11:45:39 (GMT) |
commit | b76bcc4ffc1f81a3cb5e6cabb77f127f71e2eddb (patch) | |
tree | e11e17dd28d6a25b6537eb5e9275e7926441fc67 /Doc/library/zipfile.rst | |
parent | b6c0c5ba5f1c7bec0ec8c6f7f9f07e7087de3da8 (diff) | |
download | cpython-b76bcc4ffc1f81a3cb5e6cabb77f127f71e2eddb.zip cpython-b76bcc4ffc1f81a3cb5e6cabb77f127f71e2eddb.tar.gz cpython-b76bcc4ffc1f81a3cb5e6cabb77f127f71e2eddb.tar.bz2 |
Issue #14099: Backout changeset e5bb3044402b (except adapted tests).
Diffstat (limited to 'Doc/library/zipfile.rst')
-rw-r--r-- | Doc/library/zipfile.rst | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Doc/library/zipfile.rst b/Doc/library/zipfile.rst index 465d786..1d23a7c 100644 --- a/Doc/library/zipfile.rst +++ b/Doc/library/zipfile.rst @@ -219,8 +219,14 @@ ZipFile Objects .. note:: - Objects returned by :meth:`.open` can operate independently of the - ZipFile. + If the ZipFile was created by passing in a file-like object as the first + argument to the constructor, then the object returned by :meth:`.open` shares the + ZipFile's file pointer. Under these circumstances, the object returned by + :meth:`.open` should not be used after any additional operations are performed + on the ZipFile object. If the ZipFile was created by passing in a string (the + filename) as the first argument to the constructor, then :meth:`.open` will + create a new file object that will be held by the ZipExtFile, allowing it to + operate independently of the ZipFile. .. note:: |