diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-01-26 13:45:39 +0200 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-01-26 13:45:39 +0200 |
commit | a8ec95e50e9758dbef36119cfcdb8b72445c53ec (patch) | |
tree | a24792d3c97bbda64f3232045f3bee213e32bb8b /Doc | |
parent | dc31e427b95acfa4e48b2a648a93cafe21491698 (diff) | |
download | cpython-a8ec95e50e9758dbef36119cfcdb8b72445c53ec.tar.gz |
Issue #14099: Backout changeset e5bb3044402b (except adapted tests).
Diffstat (limited to 'Doc')
-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 465d786cbd..1d23a7c4d2 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:: |