summaryrefslogtreecommitdiffstats
path: root/Modules/_io
diff options
context:
space:
mode:
authorCharles-François Natali <neologix@free.fr>2012-01-14 10:51:00 (GMT)
committerCharles-François Natali <neologix@free.fr>2012-01-14 10:51:00 (GMT)
commitd612de10e551751c44c1772a027fe6953ae04f99 (patch)
tree8565f2c4cf1527b511cc4337c9009e051a759eb3 /Modules/_io
parent138f4656e38f656afa7436c306aa74f1d4941216 (diff)
downloadcpython-d612de10e551751c44c1772a027fe6953ae04f99.zip
cpython-d612de10e551751c44c1772a027fe6953ae04f99.tar.gz
cpython-d612de10e551751c44c1772a027fe6953ae04f99.tar.bz2
Issue #12760: Refer to the new 'x' open mode as "exclusive creation" mode.
Diffstat (limited to 'Modules/_io')
-rw-r--r--Modules/_io/fileio.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/_io/fileio.c b/Modules/_io/fileio.c
index 57cd9aa..a21aa7a 100644
--- a/Modules/_io/fileio.c
+++ b/Modules/_io/fileio.c
@@ -1066,9 +1066,9 @@ PyDoc_STRVAR(fileio_doc,
"file(name: str[, mode: str][, opener: None]) -> file IO object\n"
"\n"
"Open a file. The mode can be 'r', 'w', 'x' or 'a' for reading (default),\n"
-"writing, creating or appending. The file will be created if it doesn't\n"
-"exist when opened for writing or appending; it will be truncated when\n"
-"opened for writing. A `FileExistsError` will be raised if it already\n"
+"writing, exclusive creation or appending. The file will be created if it\n"
+"doesn't exist when opened for writing or appending; it will be truncated\n"
+"when opened for writing. A `FileExistsError` will be raised if it already\n"
"exists when opened for creating. Opening a file for creating implies\n"
"writing so this mode behaves in a similar way to 'w'.Add a '+' to the mode\n"
"to allow simultaneous reading and writing. A custom opener can be used by\n"