Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1514)

Unified Diff: Doc/library/io.rst

Issue 12760: Add create mode to open()
Patch Set: Created 1 year, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Doc/whatsnew/3.3.rst » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Doc/library/io.rst Wed Jan 11 21:00:48 2012 -0500
+++ b/Doc/library/io.rst Thu Jan 12 07:35:13 2012 +0200
@@ -472,12 +472,12 @@
to which the resulting :class:`FileIO` object will give access.
The *mode* can be ``'r'``, ``'w'``, ``'x'`` or ``'a'`` for reading
- (default), writing, creating or appending. The file will be created if it
- doesn't exist when opened for writing or appending; it will be truncated
- when opened for writing. :exc:`FileExistsError` will be raised if it already
- exists when opened for creating. Opening a file for creating implies
- writing, so this mode behaves in a similar way to ``'w'``. Add a ``'+'`` to
- the mode to allow simultaneous reading and writing.
+ (default), writing, exclusive creation or appending. The file will be
+ created if it doesn't exist when opened for writing or appending; it will be
+ truncated when opened for writing. :exc:`FileExistsError` will be raised if
+ it already exists when opened for creating. Opening a file for creating
+ implies writing, so this mode behaves in a similar way to ``'w'``. Add a
+ ``'+'`` to the mode to allow simultaneous reading and writing.
The :meth:`read` (when called with a positive argument), :meth:`readinto`
and :meth:`write` methods on this class will only make one system call.
« no previous file with comments | « no previous file | Doc/whatsnew/3.3.rst » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld cbc36f91f3f7