summaryrefslogtreecommitdiffstats
path: root/Doc/lib
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2001-12-10 16:43:08 (GMT)
committerFred Drake <fdrake@acm.org>2001-12-10 16:43:08 (GMT)
commit6048ce95a94ee4527799d7c2fe43ffa43fa64990 (patch)
tree4af3471cbc1c3f8f46bb8f96ac3468dc513aec02 /Doc/lib
parent61d3637ff8616d3e231a20f8f0da3237e27ca40c (diff)
downloadcpython-6048ce95a94ee4527799d7c2fe43ffa43fa64990.zip
cpython-6048ce95a94ee4527799d7c2fe43ffa43fa64990.tar.gz
cpython-6048ce95a94ee4527799d7c2fe43ffa43fa64990.tar.bz2
Added documentation for str.decode().
This closes SF bug #490823.
Diffstat (limited to 'Doc/lib')
-rw-r--r--Doc/lib/libstdtypes.tex10
1 files changed, 10 insertions, 0 deletions
diff --git a/Doc/lib/libstdtypes.tex b/Doc/lib/libstdtypes.tex
index ed0c4d9..a92928e 100644
--- a/Doc/lib/libstdtypes.tex
+++ b/Doc/lib/libstdtypes.tex
@@ -502,6 +502,16 @@ S\code{[\var{start}:\var{end}]}. Optional arguments \var{start} and
\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