summaryrefslogtreecommitdiffstats
path: root/Doc/library/io.rst
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2012-08-14 07:40:26 (GMT)
committerGeorg Brandl <georg@python.org>2012-08-14 07:40:26 (GMT)
commit1487c931cbe62515598473a30eab0e5ac746114f (patch)
tree51b56a75cc5e24383a39700814263a50d2b28fdd /Doc/library/io.rst
parent9c7e100ccdda495a2aa274b19c7090028eb21663 (diff)
parent296d1bea6aab9c5cb78ec4f90369352aba64d7c5 (diff)
downloadcpython-1487c931cbe62515598473a30eab0e5ac746114f.zip
cpython-1487c931cbe62515598473a30eab0e5ac746114f.tar.gz
cpython-1487c931cbe62515598473a30eab0e5ac746114f.tar.bz2
merge with 3.2
Diffstat (limited to 'Doc/library/io.rst')
-rw-r--r--Doc/library/io.rst29
1 files changed, 13 insertions, 16 deletions
diff --git a/Doc/library/io.rst b/Doc/library/io.rst
index 5fec4cd..f632752 100644
--- a/Doc/library/io.rst
+++ b/Doc/library/io.rst
@@ -771,22 +771,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.