summaryrefslogtreecommitdiffstats
path: root/Doc/library/io.rst
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2014-02-02 21:49:03 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2014-02-02 21:49:03 (GMT)
commit9c2389d2824dc07eb8ef757734b9f077cd767e2e (patch)
treed0faad07e00829039c4a6e32d14f0a89c9c7a4b0 /Doc/library/io.rst
parent084443809f278ae433cc383225afc4d459d58661 (diff)
parentbe7ff9f2f9d659fb2061b373a9788a777a23b4b1 (diff)
downloadcpython-9c2389d2824dc07eb8ef757734b9f077cd767e2e.zip
cpython-9c2389d2824dc07eb8ef757734b9f077cd767e2e.tar.gz
cpython-9c2389d2824dc07eb8ef757734b9f077cd767e2e.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 2b55018..c80198b 100644
--- a/Doc/library/io.rst
+++ b/Doc/library/io.rst
@@ -849,13 +849,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: