Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6048ce9

Browse files
committed
Added documentation for str.decode().
This closes SF bug #490823.
1 parent 61d3637 commit 6048ce9

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

Doc/lib/libstdtypes.tex

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,16 @@ \subsubsection{String Methods \label{string-methods}}
502502
\var{end} are interpreted as in slice notation.
503503
\end{methoddesc}
504504

505+
\begin{methoddesc}[string]{decode}{\optional{encoding\optional{, errors}}}
506+
Decodes the string using the codec registered for \var{encoding}.
507+
\var{encoding} defaults to the default string encoding. \var{errors}
508+
may be given to set a different error handling scheme. The default is
509+
\code{'strict'}, meaning that encoding errors raise
510+
\exception{ValueError}. Other possible values are \code{'ignore'} and
511+
\code{replace'}.
512+
\versionadded{2.2}
513+
\end{methoddesc}
514+
505515
\begin{methoddesc}[string]{encode}{\optional{encoding\optional{,errors}}}
506516
Return an encoded version of the string. Default encoding is the current
507517
default string encoding. \var{errors} may be given to set a different

0 commit comments

Comments
 (0)