summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2014-02-02 21:48:25 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2014-02-02 21:48:25 (GMT)
commit8a2e22ef3501bb295264d06b3f014532eb1dac6b (patch)
treeb1c6f023aa2e651c50ee9c106eb3ae5b30c9c107
parent15b67d7d5bd66a8003356116ecccaa4fb23ab61a (diff)
downloadcpython-8a2e22ef3501bb295264d06b3f014532eb1dac6b.zip
cpython-8a2e22ef3501bb295264d06b3f014532eb1dac6b.tar.gz
cpython-8a2e22ef3501bb295264d06b3f014532eb1dac6b.tar.bz2
Issue #20423: fix documentation of io.StringIO's newline parameter
-rw-r--r--Doc/library/io.rst6
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/library/io.rst b/Doc/library/io.rst
index c866c98..c2f5155 100644
--- a/Doc/library/io.rst
+++ b/Doc/library/io.rst
@@ -791,14 +791,14 @@ Text I/O
Whether line buffering is enabled.
-.. class:: StringIO(initial_value=u'', newline=None)
+.. class:: StringIO(initial_value=u'', newline=u'\\n')
An in-memory stream for unicode text. It inherits :class:`TextIOWrapper`.
The initial value of the buffer (an empty unicode string by default) can
be set by providing *initial_value*. The *newline* argument works like
- that of :class:`TextIOWrapper`. The default is to do no newline
- translation.
+ that of :class:`TextIOWrapper`. The default is to consider only ``\n``
+ characters as end of lines and to do no newline translation.
:class:`StringIO` provides this method in addition to those from
:class:`TextIOWrapper` and its parents: