mirror of
https://github.com/python/cpython.git
synced 2025-10-12 01:43:12 +00:00
Issue #12760: Refer to the new 'x' open mode as "exclusive creation" mode.
This commit is contained in:
parent
138f4656e3
commit
d612de10e5
4 changed files with 13 additions and 12 deletions
|
@ -41,7 +41,7 @@ def open(file, mode="r", buffering=-1, encoding=None, errors=None,
|
|||
mode is an optional string that specifies the mode in which the file is
|
||||
opened. It defaults to 'r' which means open for reading in text mode. Other
|
||||
common values are 'w' for writing (truncating the file if it already
|
||||
exists), 'x' for creating and writing to a new file, and 'a' for appending
|
||||
exists), 'x' for exclusive creation of a new file, and 'a' for appending
|
||||
(which on some Unix systems, means that all writes append to the end of the
|
||||
file regardless of the current seek position). In text mode, if encoding is
|
||||
not specified the encoding used is platform dependent. (For reading and
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue