Simple unicode-safe version of str(exception)?

Torsten Bronger bronger at
Tue Apr 29 22:34:26 CEST 2008


Russell E. Owen writes:

> Torsten Bronger <bronger at> wrote:
>> Russell E. Owen writes:
>>> [...]
>>> repeat the original question, is there any simpler
>>> unicode-safe replacement for str(exception)?
>> Please show us the tracebacks you get becuae unicode(s) must
>> fail, too, if there are non-ASCII characters involved.
> Why?
> [...]
>>>> ",".join([unicode(s) for s in e.args])
> u'\xb0'

I thought you wanted to have a string.  But this is again a unicode.


Torsten Bronger, aquisgrana, europa vetus
                                      Jabber ID: bronger at
               (See for further contact info.)

More information about the Python-list mailing list