Mercurial > cpython-lru_cache-weakref
diff Doc/lib/libstdtypes.tex @ 21332:fbbd8a4ca7a6 legacy-trunk
Added documentation for str.decode().
This closes SF bug #490823.
| author | Fred Drake <fdrake@acm.org> |
|---|---|
| date | Mon, 10 Dec 2001 16:43:08 +0000 |
| parents | 7d1eac41ce3e |
| children | 5d4135609efc |
line wrap: on
line diff
--- a/Doc/lib/libstdtypes.tex Mon Dec 10 16:42:43 2001 +0000 +++ b/Doc/lib/libstdtypes.tex Mon Dec 10 16:43:08 2001 +0000 @@ -502,6 +502,16 @@ \var{end} are interpreted as in slice notation. \end{methoddesc} +\begin{methoddesc}[string]{decode}{\optional{encoding\optional{, errors}}} +Decodes the string using the codec registered for \var{encoding}. +\var{encoding} defaults to the default string encoding. \var{errors} +may be given to set a different error handling scheme. The default is +\code{'strict'}, meaning that encoding errors raise +\exception{ValueError}. Other possible values are \code{'ignore'} and +\code{replace'}. +\versionadded{2.2} +\end{methoddesc} + \begin{methoddesc}[string]{encode}{\optional{encoding\optional{,errors}}} Return an encoded version of the string. Default encoding is the current default string encoding. \var{errors} may be given to set a different
