Mercurial > cpython-lru_cache-weakref
diff Lib/StringIO.py @ 25622:a0005d26773d 2.2
Whitespace normalization.
| author | Tim Peters <tim.peters@gmail.com> |
|---|---|
| date | Mon, 07 Oct 2002 01:18:17 +0000 |
| parents | 64eb119b816d |
| children |
line wrap: on
line diff
--- a/Lib/StringIO.py Mon Oct 07 00:59:01 2002 +0000 +++ b/Lib/StringIO.py Mon Oct 07 01:18:17 2002 +0000 @@ -37,16 +37,16 @@ __all__ = ["StringIO"] class StringIO: - """class StringIO([buffer]) - + """class StringIO([buffer]) + When a StringIO object is created, it can be initialized to an existing string by passing the string to the constructor. If no string is given, - the StringIO will start empty. + the StringIO will start empty. The StringIO object can accept either Unicode or 8-bit strings, but mixing the two may take some care. If both are used, 8-bit strings that cannot be interpreted as 7-bit ASCII (that use the 8th bit) will cause - a UnicodeError to be raised when getvalue() is called. + a UnicodeError to be raised when getvalue() is called. """ def __init__(self, buf = ''): # Force self.buf to be a string or unicode @@ -185,7 +185,7 @@ but mixing the two may take some care. If both are used, 8-bit strings that cannot be interpreted as 7-bit ASCII (that use the 8th bit) will cause a UnicodeError to be raised when getvalue() - is called. + is called. """ if self.buflist: self.buf += ''.join(self.buflist)
