From: Antoine Pitrou Date: Sun, 2 Feb 2014 21:48:25 +0000 (+0100) Subject: Issue #20423: fix documentation of io.StringIO's newline parameter X-Git-Tag: v2.7.8~61 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8a2e22ef3501bb295264d06b3f014532eb1dac6b;p=python Issue #20423: fix documentation of io.StringIO's newline parameter --- diff --git a/Doc/library/io.rst b/Doc/library/io.rst index c866c98097..c2f5155a91 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: