(original) (raw)

changeset: 88909:df2efd48227e parent: 88906:0d3831bbc5f0 parent: 88907:82cfab2ad98d user: Antoine Pitrou solipsis@pitrou.net date: Sun Feb 02 22:49:03 2014 +0100 files: Doc/library/io.rst description: Issue #20423: fix documentation of io.StringIO's newline parameter diff -r 0d3831bbc5f0 -r df2efd48227e Doc/library/io.rst --- a/Doc/library/io.rst Sun Feb 02 22:43:39 2014 +0100 +++ b/Doc/library/io.rst Sun Feb 02 22:49:03 2014 +0100 @@ -849,13 +849,14 @@ 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: /solipsis@pitrou.net