Message9143
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.
|
|
Date |
User |
Action |
Args |
2007-08-23 13:59:05 | admin | link | issue513666 messages |
2007-08-23 13:59:05 | admin | create | |
|