Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e5c05cc

Browse files
committed
minor clarification on Zipfile 'x' mode - exclusive creation of a file.
1 parent 38150e0 commit e5c05cc

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Doc/library/zipfile.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ ZipFile Objects
134134

135135
Open a ZIP file, where *file* can be either a path to a file (a string) or a
136136
file-like object. The *mode* parameter should be ``'r'`` to read an existing
137-
file, ``'w'`` to truncate and write a new file, ``'x'`` to exclusive create
138-
and write a new file, or ``'a'`` to append to an existing file.
137+
file, ``'w'`` to truncate and write a new file, ``'a'`` to append to an
138+
existing file, or ``'x'`` to exclusively create and write a new file.
139139
If *mode* is ``'x'`` and *file* refers to an existing file,
140140
a :exc:`FileExistsError` will be raised.
141141
If *mode* is ``'a'`` and *file* refers to an existing ZIP

0 commit comments

Comments
 (0)