Mercurial > cpython-lru_cache-weakref
diff Doc/lib/libcodecs.tex @ 23087:09db3f5d0bd0 legacy-trunk
added small clarification to the descriptions of encode() and decode()
| author | Skip Montanaro <skip@pobox.com> |
|---|---|
| date | Tue, 16 Apr 2002 15:12:10 +0000 |
| parents | 376ee174ecd0 |
| children | a3c982d412b4 |
line wrap: on
line diff
--- a/Doc/lib/libcodecs.tex Tue Apr 16 15:04:56 2002 +0000 +++ b/Doc/lib/libcodecs.tex Tue Apr 16 15:12:10 2002 +0000 @@ -201,7 +201,10 @@ \begin{methoddesc}{encode}{input\optional{, errors}} Encodes the object \var{input} and returns a tuple (output object, - length consumed). + length consumed). While codecs are not restricted to use with Unicode, in + a Unicode context, encoding converts a Unicode object to a plain string + using a particular character set encoding (e.g., \code{cp1252} or + \code{iso-8859-1}). \var{errors} defines the error handling to apply. It defaults to \code{'strict'} handling. @@ -216,7 +219,8 @@ \begin{methoddesc}{decode}{input\optional{, errors}} Decodes the object \var{input} and returns a tuple (output object, - length consumed). + length consumed). In a Unicode context, decoding converts a plain string + encoded using a particular character set encoding to a Unicode object. \var{input} must be an object which provides the \code{bf_getreadbuf} buffer slot. Python strings, buffer objects and memory mapped files
