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
296d1bea
Commit
296d1bea
authored
Aug 14, 2012
by
Georg Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restore original line lengths.
parent
6f5c5cb7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
32 deletions
+26
-32
Doc/library/functions.rst
Doc/library/functions.rst
+13
-16
Doc/library/io.rst
Doc/library/io.rst
+13
-16
No files found.
Doc/library/functions.rst
View file @
296d1bea
...
...
@@ -878,22 +878,19 @@ are always available. They are listed here in alphabetical order.
mode). It can be ``None``, ``''``, ``'\n'``, ``'\r'``, and ``'\r\n'``. It
works as follows:
* When reading input from the stream, if *newline* is ``None``,
universal newlines mode is enabled. Lines in the input can end
in ``'\n'``, ``'\r'``, or ``'\r\n'``, and these are translated
into ``'\n'`` before being returned to the caller. If it is
``''``, universal newline mode is enabled, but line endings are
returned to the caller untranslated. If it has any of the other
legal values, input lines are only terminated by the given
string, and the line ending is returned to the caller
untranslated.
* When writing output to the stream, if *newline* is ``None``, any
``'\n'`` characters written are translated to the system default
line separator, :data:`os.linesep`. If *newline* is ``''`` or
``'\n'``, no translation takes place. If *newline* is any of the
other legal values, any ``'\n'`` characters written are
translated to the given string.
* When reading input from the stream, if *newline* is ``None``, universal
newlines mode is enabled. Lines in the input can end in ``'\n'``,
``'\r'``, or ``'\r\n'``, and these are translated into ``'\n'`` before
being returned to the caller. If it is ``''``, universal newline mode is
enabled, but line endings are returned to the caller untranslated. If it
has any of the other legal values, input lines are only terminated by the
given string, and the line ending is returned to the caller untranslated.
* When writing output to the stream, if *newline* is ``None``, any ``'\n'``
characters written are translated to the system default line separator,
:data:`os.linesep`. If *newline* is ``''`` or ``'\n'``, no translation
takes place. If *newline* is any of the other legal values, any ``'\n'``
characters written are translated to the 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 @
296d1bea
...
...
@@ -760,22 +760,19 @@ Text I/O
*newline* controls how line endings are handled. It can be ``None``,
``''``, ``'\n'``, ``'\r'``, and ``'\r\n'``. It works as follows:
* When reading input from the stream, if *newline* is ``None``,
universal newlines mode is enabled. Lines in the input can end
in ``'\n'``, ``'\r'``, or ``'\r\n'``, and these are translated
into ``'\n'`` before being returned to the caller. If it is
``''``, universal newline mode is enabled, but line endings are
returned to the caller untranslated. If it has any of the other
legal values, input lines are only terminated by the given
string, and the line ending is returned to the caller
untranslated.
* When writing output to the stream, if *newline* is ``None``, any
``'\n'`` characters written are translated to the system default
line separator, :data:`os.linesep`. If *newline* is ``''`` or
``'\n'``, no translation takes place. If *newline* is any of the
other legal values, any ``'\n'`` characters written are
translated to the given string.
* When reading input from the stream, if *newline* is ``None``, universal
newlines mode is enabled. Lines in the input can end in ``'\n'``,
``'\r'``, or ``'\r\n'``, and these are translated into ``'\n'`` before
being returned to the caller. If it is ``''``, universal newline mode is
enabled, but line endings are returned to the caller untranslated. If it
has any of the other legal values, input lines are only terminated by the
given string, and the line ending is returned to the caller untranslated.
* When writing output to the stream, if *newline* is ``None``, any ``'\n'``
characters written are translated to the system default line separator,
:data:`os.linesep`. If *newline* is ``''`` or ``'\n'``, no translation
takes place. If *newline* is any of the other legal values, any ``'\n'``
characters written are translated to the given string.
If *line_buffering* is ``True``, :meth:`flush` is implied when a call to
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