Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
c61a8549
Commit
c61a8549
authored
Aug 04, 2012
by
Victor Stinner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
open() / TextIOWrapper doc: make it explicit than newline='\n' doesn't
translate newlines on output.
parent
67081c31
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
12 deletions
+12
-12
Doc/library/functions.rst
Doc/library/functions.rst
+3
-3
Doc/library/io.rst
Doc/library/io.rst
+3
-3
Modules/_io/_iomodule.c
Modules/_io/_iomodule.c
+3
-3
Modules/_io/textio.c
Modules/_io/textio.c
+3
-3
No files found.
Doc/library/functions.rst
View file @
c61a8549
...
...
@@ -888,9 +888,9 @@ are always available. They are listed here in alphabetical order.
* On output, if *newline* is ``None``, any ``'\n'`` characters written are
translated to the system default line separator, :data:`os.linesep`. If
*newline* is ``''``
, no translation takes place. If *newline* is any of
the other legal values, any ``'\n'`` characters written are translated to
the given string.
*newline* is ``''``
or ``'\n'``, no translation takes place. If *newline*
is any of the other legal values, any ``'\n'`` characters written are
t
ranslated to t
he given string.
If *closefd* is ``False`` and a file descriptor rather than a filename was
given, the underlying file descriptor will be kept open when the file is
...
...
Doc/library/io.rst
View file @
c61a8549
...
...
@@ -770,9 +770,9 @@ Text I/O
* On output, if *newline* is ``None``, any ``'\n'`` characters written are
translated to the system default line separator, :data:`os.linesep`. If
*newline* is ``''``
, no translation takes place. If *newline* is any of
the other legal values, any ``'\n'`` characters written are translated to
the given string.
*newline* is ``''``
or ``'\n'``, no translation takes place. If *newline*
is any of the other legal values, any ``'\n'`` characters written are
t
ranslated to t
he given string.
If *line_buffering* is ``True``, :meth:`flush` is implied when a call to
write contains a newline character.
...
...
Modules/_io/_iomodule.c
View file @
c61a8549
...
...
@@ -264,9 +264,9 @@ PyDoc_STRVAR(open_doc,
"
\n
"
"* On output, if newline is None, any '
\\
n' characters written are
\n
"
" translated to the system default line separator, os.linesep. If
\n
"
" newline is ''
, no translation takes place. If newline is any of the
\n
"
" o
ther legal values, any '
\\
n' characters written are translated to
\n
"
" the given string.
\n
"
" newline is ''
or '
\n
', no translation takes place. If newline is any
\n
"
" o
f the other legal values, any '
\\
n' characters written are translated
\n
"
" t
o t
he given string.
\n
"
"
\n
"
"If closefd is False, the underlying file descriptor will be kept open
\n
"
"when the file is closed. This does not work when a file name is given
\n
"
...
...
Modules/_io/textio.c
View file @
c61a8549
...
...
@@ -635,9 +635,9 @@ PyDoc_STRVAR(textiowrapper_doc,
"
\n
"
"* On output, if newline is None, any '
\\
n' characters written are
\n
"
" translated to the system default line separator, os.linesep. If
\n
"
" newline is ''
, no translation takes place. If newline is any of the
\n
"
" o
ther legal values, any '
\\
n' characters written are translated to
\n
"
" the given string.
\n
"
" newline is ''
or '
\n
', no translation takes place. If newline is any
\n
"
" o
f the other legal values, any '
\\
n' characters written are translated
\n
"
" t
o t
he given string.
\n
"
"
\n
"
"If line_buffering is True, a call to flush is implied when a call to
\n
"
"write contains a newline character."
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment