mirror of
https://github.com/python/cpython.git
synced 2025-10-12 01:43:12 +00:00
Patch #1714700: clarify os.linesep vs. tfiles opened in text mode.
(backport)
This commit is contained in:
parent
914c98bfe3
commit
5a25e45d3a
1 changed files with 6 additions and 3 deletions
|
@ -1973,9 +1973,12 @@ Also available via \module{os.path}.
|
||||||
|
|
||||||
\begin{datadesc}{linesep}
|
\begin{datadesc}{linesep}
|
||||||
The string used to separate (or, rather, terminate) lines on the
|
The string used to separate (or, rather, terminate) lines on the
|
||||||
current platform. This may be a single character, such as \code{'\e
|
current platform. This may be a single character, such as
|
||||||
n'} for \POSIX{} or \code{'\e r'} for Mac OS, or multiple characters,
|
\code{'\e n'} for \POSIX{} or \code{'\e r'} for Mac OS, or multiple
|
||||||
for example, \code{'\e r\e n'} for Windows.
|
characters, for example, \code{'\e r\e n'} for Windows.
|
||||||
|
Do not use \var{os.linesep} as a line terminator when writing files
|
||||||
|
opened in text mode (the default); use a single \code{'\e n'} instead,
|
||||||
|
on all platforms.
|
||||||
\end{datadesc}
|
\end{datadesc}
|
||||||
|
|
||||||
\begin{datadesc}{devnull}
|
\begin{datadesc}{devnull}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue