]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Note that unicode() can raise LookupError for unknown codecs.
authorFred Drake <fdrake@acm.org>
Tue, 9 Jul 2002 05:27:12 +0000 (05:27 +0000)
committerFred Drake <fdrake@acm.org>
Tue, 9 Jul 2002 05:27:12 +0000 (05:27 +0000)
Closes SF bug #513666.

Doc/lib/libfuncs.tex

index e7df5eab91b6171f6f7a7c9bca8ba59b3f1b5eef..7c542077d565a154d2b24c8f125f8392d4e423fa 100644 (file)
@@ -819,7 +819,8 @@ def my_import(name):
   If \var{encoding} and/or \var{errors} are given, \code{unicode()}
   will decode the object which can either be an 8-bit string or a
   character buffer using the codec for \var{encoding}. The
-  \var{encoding} parameter is a string giving the name of an encoding.
+  \var{encoding} parameter is a string giving the name of an encoding;
+  if the encoding is not known, \exception{LookupError} is raised.
   Error handling is done according to \var{errors}; this specifies the
   treatment of characters which are invalid in the input encoding.  If
   \var{errors} is \code{'strict'} (the default), a