[Python-checkins] cpython (3.5): minor clarification on Zipfile 'x' mode - exclusive creation of a file.

senthil.kumaran python-checkins at python.org
Fri Jan 22 00:08:31 EST 2016


https://hg.python.org/cpython/rev/670de0acba80
changeset:   100032:670de0acba80
branch:      3.5
parent:      100029:8dbd3861eb5f
user:        Senthil Kumaran <senthil at uthcode.com>
date:        Thu Jan 21 21:06:47 2016 -0800
summary:
  minor clarification on Zipfile 'x' mode - exclusive creation of a file.

files:
  Doc/library/zipfile.rst |  4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)


diff --git a/Doc/library/zipfile.rst b/Doc/library/zipfile.rst
--- a/Doc/library/zipfile.rst
+++ b/Doc/library/zipfile.rst
@@ -134,8 +134,8 @@
 
    Open a ZIP file, where *file* can be either a path to a file (a string) or a
    file-like object.  The *mode* parameter should be ``'r'`` to read an existing
-   file, ``'w'`` to truncate and write a new file, ``'x'`` to exclusive create
-   and write a new file, or ``'a'`` to append to an existing file.
+   file, ``'w'`` to truncate and write a new file, ``'a'`` to append to an
+   existing file, or ``'x'`` to exclusively create and write a new file.
    If *mode* is ``'x'`` and *file* refers to an existing file,
    a :exc:`FileExistsError` will be raised.
    If *mode* is ``'a'`` and *file* refers to an existing ZIP

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list