Issue #12760: Refer to the new 'x' open mode as "exclusive creation" mode.

This commit is contained in:
Charles-François Natali 2012-01-14 11:51:00 +01:00
parent 138f4656e3
commit d612de10e5
4 changed files with 13 additions and 12 deletions

View file

@ -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