Kaydet (Commit) 59b328e1 authored tarafından Guido van Rossum's avatar Guido van Rossum

Added warning about behavior of open mode 'a' (or 'a+').

üst e71c5a75
......@@ -265,7 +265,10 @@ any kind of sequence; the result is always a list.
\code{fopen()}: \var{filename} is the file name to be opened,
\var{mode} indicates how the file is to be opened: \code{'r'} for
reading, \code{'w'} for writing (truncating an existing file), and
\code{'a'} opens it for appending. Modes \code{'r+'}, \code{'w+'} and
\code{'a'} opens it for appending (which on {\em some} {\UNIX}
systems means that {\em all} writes append to the end of the file,
regardless of the current seek position).
Modes \code{'r+'}, \code{'w+'} and
\code{'a+'} open the file for updating, provided the underlying
\code{stdio} library understands this. On systems that differentiate
between binary and text files, \code{'b'} appended to the mode opens
......
......@@ -265,7 +265,10 @@ any kind of sequence; the result is always a list.
\code{fopen()}: \var{filename} is the file name to be opened,
\var{mode} indicates how the file is to be opened: \code{'r'} for
reading, \code{'w'} for writing (truncating an existing file), and
\code{'a'} opens it for appending. Modes \code{'r+'}, \code{'w+'} and
\code{'a'} opens it for appending (which on {\em some} {\UNIX}
systems means that {\em all} writes append to the end of the file,
regardless of the current seek position).
Modes \code{'r+'}, \code{'w+'} and
\code{'a+'} open the file for updating, provided the underlying
\code{stdio} library understands this. On systems that differentiate
between binary and text files, \code{'b'} appended to the mode opens
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment