summaryrefslogtreecommitdiffstats
path: root/Doc/library/io.rst
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)
commitbe7ff9f2f9d659fb2061b373a9788a777a23b4b1 (patch)
tree342a285f294c6423bff90b8c61c8ee792661d946 /Doc/library/io.rst
parent92af06bb5ab678bd21a73d909b368eef87e6c945 (diff)
downloadcpython-be7ff9f2f9d659fb2061b373a9788a777a23b4b1.zip
cpython-be7ff9f2f9d659fb2061b373a9788a777a23b4b1.tar.gz
cpython-be7ff9f2f9d659fb2061b373a9788a777a23b4b1.tar.bz2
Issue #20423: fix documentation of io.StringIO's newline parameter
Diffstat (limited to 'Doc/library/io.rst')
-rw-r--r--Doc/library/io.rst5
1 files changed, 3 insertions, 2 deletions
diff --git a/Doc/library/io.rst b/Doc/library/io.rst
index bd0ce67..3d723c0 100644
--- a/Doc/library/io.rst
+++ b/Doc/library/io.rst
@@ -844,13 +844,14 @@ Text I/O
Whether line buffering is enabled.
-.. class:: StringIO(initial_value='', newline=None)
+.. class:: StringIO(initial_value='', newline='\\n')
An in-memory stream for text I/O.
The initial value of the buffer (an empty 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.
+ :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:`TextIOBase` and its parents: