]> granicus.if.org Git - python/commitdiff
Issue #20423: fix documentation of io.StringIO's newline parameter
authorAntoine Pitrou <solipsis@pitrou.net>
Sun, 2 Feb 2014 21:48:25 +0000 (22:48 +0100)
committerAntoine Pitrou <solipsis@pitrou.net>
Sun, 2 Feb 2014 21:48:25 +0000 (22:48 +0100)
Doc/library/io.rst

index c866c980976ceff84ebfe6bb568d62da895e510d..c2f5155a91dc771f80e6f99bbca21c32ffa36d8a 100644 (file)
@@ -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: