File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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}}}
506516Return an encoded version of the string. Default encoding is the current
507517default string encoding. \var {errors} may be given to set a different
You can’t perform that action at this time.
0 commit comments