[Python-checkins] cpython (3.3): Issue #20423: fix documentation of io.StringIO's newline parameter

antoine.pitrou python-checkins at python.org
Sun Feb 2 22:51:53 CET 2014


http://hg.python.org/cpython/rev/82cfab2ad98d
changeset: 88907:82cfab2ad98d
branch: 3.3
parent: 88904:e6363a42a9f0
user: Antoine Pitrou <solipsis at pitrou.net>
date: Sun Feb 02 22:48:25 2014 +0100
summary:
 Issue #20423: fix documentation of io.StringIO's newline parameter
files:
 Doc/library/io.rst | 5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/Doc/library/io.rst b/Doc/library/io.rst
--- a/Doc/library/io.rst
+++ b/Doc/library/io.rst
@@ -844,13 +844,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:
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /