Ignore:
Timestamp:
Mar 19, 2014, 11:31:01 PM (11 years ago)
Author:
dmik
Message:

python: Merge vendor 2.7.6 to trunk.

Location:
python/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • python/trunk

  • python/trunk/Doc/library/stringio.rst

    r2 r391  
    7272instead.
    7373
    74 Since this module provides a factory function which returns objects of built-in
    75 types, there's no way to build your own version using subclassing.  It's not
    76 possible to set attributes on it.  Use the original :mod:`StringIO` module in
    77 those cases.
    7874
    79 Unlike the memory files implemented by the :mod:`StringIO` module, those
    80 provided by this module are not able to accept Unicode strings that cannot be
    81 encoded as plain ASCII strings.
     75.. function:: StringIO([s])
    8276
    83 Calling :func:`StringIO` with a Unicode string parameter populates
    84 the object with the buffer representation of the Unicode string, instead of
    85 encoding the string.
     77   Return a StringIO-like stream for reading or writing.
    8678
    87 Another difference from the :mod:`StringIO` module is that calling
    88 :func:`StringIO` with a string parameter creates a read-only object. Unlike an
    89 object created without a string parameter, it does not have write methods.
    90 These objects are not generally visible.  They turn up in tracebacks as
    91 :class:`StringI` and :class:`StringO`.
     79   Since this is a factory function which returns objects of built-in types,
     80   there's no way to build your own version using subclassing.  It's not
     81   possible to set attributes on it.  Use the original :mod:`StringIO` module in
     82   those cases.
     83
     84   Unlike the :mod:`StringIO` module, this module is not able to accept Unicode
     85   strings that cannot be encoded as plain ASCII strings.
     86
     87   Another difference from the :mod:`StringIO` module is that calling
     88   :func:`StringIO` with a string parameter creates a read-only object. Unlike an
     89   object created without a string parameter, it does not have write methods.
     90   These objects are not generally visible.  They turn up in tracebacks as
     91   :class:`StringI` and :class:`StringO`.
     92
     93
    9294
    9395The following data objects are provided as well:
Note: See TracChangeset for help on using the changeset viewer.