This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author che_fox
Recipients
Date 2002-02-06.08:52:47
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
The unicode() docs say:

"If errors is 'strict' (the default), a ValueError is
raised on errors..."

This is not true; ValueError is only raised on
conversion errors.  There are other exceptions that can
be raised:

Python 2.1.2 (#1, Jan 18 2002, 18:05:45) 
[GCC 2.95.4  (Debian prerelease)] on linux2
Type "copyright", "credits" or "license" for more
information.

>>> unicode("abc", "nonexistent codec")
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
LookupError: unknown encoding

Looking at src/Objects/unicodeobject.c, there are lots
of other exceptions that can be raised.  The
documentation should probably be clarified.
History
Date User Action Args
2007-08-23 13:59:05adminlinkissue513666 messages
2007-08-23 13:59:05admincreate