On 06/16/2010 03:51 PM, Thomas Jollans wrote:
> On 06/16/2010 10:10 PM, Stuart McGraw wrote:
>> Note that the exceptions may be anything (I just used IOError 
>> as an example) and are generated in bowels of an API that I 
>> can't/won't mess with.
> 
> Yeah, well, you'd have to special-case every single exception type that
> gets unicode arguments, as they probably all treat them in the same
> ungrateful way.

Unfortunate.  In general it does not seem possible to know what 
exceptions could be generated (they could be custom exceptions 
defined in the api) without examining all the code. 

Seems like I'll have to live with it or try some grotesque hack 
like looking for a repr-of-a-unicode-string-like text and converting
back to unicode.

Thanks.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to