diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2014-02-02 21:49:03 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2014-02-02 21:49:03 (GMT) |
commit | 9c2389d2824dc07eb8ef757734b9f077cd767e2e (patch) | |
tree | d0faad07e00829039c4a6e32d14f0a89c9c7a4b0 | |
parent | 084443809f278ae433cc383225afc4d459d58661 (diff) | |
parent | be7ff9f2f9d659fb2061b373a9788a777a23b4b1 (diff) | |
download | cpython-9c2389d2824dc07eb8ef757734b9f077cd767e2e.zip cpython-9c2389d2824dc07eb8ef757734b9f077cd767e2e.tar.gz cpython-9c2389d2824dc07eb8ef757734b9f077cd767e2e.tar.bz2 |
Issue #20423: fix documentation of io.StringIO's newline parameter
-rw-r--r-- | Doc/library/io.rst | 5 |
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: |