◐ Shell
clean mode source ↗

Message 64779 - Python tracker

To be more precise: I see no way to convert the encapsulated non-ASCII 
data from the string in an easy way.
Taking e from my last post none of the following will work:
str(e) # UnicodeDecodeError
e.__str__() # UnicodeDecodeError
e.__unicode__() # AttributeError
unicode(e) # UnicodeDecodeError
unicode(e, 'utf8') # TypeError

My solution around this right now is raising an exception with an 
already converted string (see the link I provided).

But as the tutorials speak of simply "print e" I guess the behaviour 
described above is some kind of a bug.