[Python-checkins] r82369 - in python/branches/release26-maint: Doc/library/stringio.rst

benjamin.peterson python-checkins at python.org
Tue Jun 29 17:26:44 CEST 2010


Author: benjamin.peterson
Date: Tue Jun 29 17:26:43 2010
New Revision: 82369

Log:
Merged revisions 82368 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r82368 | benjamin.peterson | 2010-06-29 10:18:02 -0500 (Tue, 29 Jun 2010) | 1 line
  
  group cStringIO docs under its factory function
........


Modified:
   python/branches/release26-maint/   (props changed)
   python/branches/release26-maint/Doc/library/stringio.rst

Modified: python/branches/release26-maint/Doc/library/stringio.rst
==============================================================================
--- python/branches/release26-maint/Doc/library/stringio.rst	(original)
+++ python/branches/release26-maint/Doc/library/stringio.rst	Tue Jun 29 17:26:43 2010
@@ -71,24 +71,29 @@
 made more efficient by using the function :func:`StringIO` from this module
 instead.
 
-Since this module provides a factory function which returns objects of built-in
-types, there's no way to build your own version using subclassing.  It's not
-possible to set attributes on it.  Use the original :mod:`StringIO` module in
-those cases.
-
-Unlike the memory files implemented by the :mod:`StringIO` module, those
-provided by this module are not able to accept Unicode strings that cannot be
-encoded as plain ASCII strings.
-
-Calling :func:`StringIO` with a Unicode string parameter populates
-the object with the buffer representation of the Unicode string, instead of
-encoding the string.
-
-Another difference from the :mod:`StringIO` module is that calling
-:func:`StringIO` with a string parameter creates a read-only object. Unlike an
-object created without a string parameter, it does not have write methods.
-These objects are not generally visible.  They turn up in tracebacks as
-:class:`StringI` and :class:`StringO`.
+
+.. function:: StringIO([s])
+
+   Return a StringIO-like stream for reading or writing.
+
+   Since this is a factory function which returns objects of built-in types,
+   there's no way to build your own version using subclassing.  It's not
+   possible to set attributes on it.  Use the original :mod:`StringIO` module in
+   those cases.
+
+   Unlike the :mod:`StringIO` module, this module is not able to accept Unicode
+   strings that cannot be encoded as plain ASCII strings.  Calling
+   :func:`StringIO` with a Unicode string parameter populates the object with
+   the buffer representation of the Unicode string instead of encoding the
+   string.
+
+   Another difference from the :mod:`StringIO` module is that calling
+   :func:`StringIO` with a string parameter creates a read-only object. Unlike an
+   object created without a string parameter, it does not have write methods.
+   These objects are not generally visible.  They turn up in tracebacks as
+   :class:`StringI` and :class:`StringO`.
+
+
 
 The following data objects are provided as well:
 


More information about the Python-checkins mailing list