diff options
author | Charles-François Natali <neologix@free.fr> | 2012-01-09 21:40:02 (GMT) |
---|---|---|
committer | Charles-François Natali <neologix@free.fr> | 2012-01-09 21:40:02 (GMT) |
commit | dc3044c7043b687f3be97a731d873dc991f5d83b (patch) | |
tree | eb7ae132b0c152c6ad9dcfe3ae63b80cd2acdb4a /Doc/library/os.rst | |
parent | 8a9b9c7d165c55ef368a5d0be539e17ad3f201d4 (diff) | |
download | cpython-dc3044c7043b687f3be97a731d873dc991f5d83b.zip cpython-dc3044c7043b687f3be97a731d873dc991f5d83b.tar.gz cpython-dc3044c7043b687f3be97a731d873dc991f5d83b.tar.bz2 |
Issue #12760: Add a create mode to open(). Patch by David Townshend.
Diffstat (limited to 'Doc/library/os.rst')
-rw-r--r-- | Doc/library/os.rst | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Doc/library/os.rst b/Doc/library/os.rst index bb1ebd9..53f5025 100644 --- a/Doc/library/os.rst +++ b/Doc/library/os.rst @@ -591,7 +591,8 @@ These functions create new :term:`file objects <file object>`. (See also :func:` the built-in :func:`open` function. When specified, the *mode* argument must start with one of the letters - ``'r'``, ``'w'``, or ``'a'``, otherwise a :exc:`ValueError` is raised. + ``'r'``, ``'w'``, ``'x'`` or ``'a'``, otherwise a :exc:`ValueError` is + raised. On Unix, when the *mode* argument starts with ``'a'``, the *O_APPEND* flag is set on the file descriptor (which the :c:func:`fdopen` implementation already @@ -599,6 +600,8 @@ These functions create new :term:`file objects <file object>`. (See also :func:` Availability: Unix, Windows. + .. versionchanged:: 3.3 + The ``'x'`` mode was added. .. _os-fd-ops: |