Hi,
There seems to be some inconsistency in the way exceptions handle Unicode
strings. For instance, KeyError seems to not have a problem with them
raise KeyError('a')
Traceback (most recent call last):
File stdin, line 1, in module
KeyError: 'a'
raise KeyError(u'ä')
Traceback (most recent
On Thu, 16 Jan 2014 13:34:08 +0100, Ernest Adrogué wrote:
Hi,
There seems to be some inconsistency in the way exceptions handle
Unicode strings.
Yes. I believe the problem lies in the __str__ method. For example,
KeyError manages to handle Unicode, although in an ugly way:
py
In article 52d7e9a0$0$2$c3e8da3$54964...@news.astraweb.com,
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote:
On Thu, 16 Jan 2014 13:34:08 +0100, Ernest Adrogué wrote:
Hi,
There seems to be some inconsistency in the way exceptions handle
Unicode strings.
Yes. I
On 1/16/2014 7:34 AM, Ernest Adrogué wrote:
Hi,
There seems to be some inconsistency in the way exceptions handle Unicode
strings. For instance, KeyError seems to not have a problem with them
raise KeyError('a')
Traceback (most recent call last):
File stdin, line 1, in module
KeyError:
On 1/16/2014 9:16 AM, Steven D'Aprano wrote:
On Thu, 16 Jan 2014 13:34:08 +0100, Ernest Adrogué wrote:
Hi,
There seems to be some inconsistency in the way exceptions handle
Unicode strings.
Yes. I believe the problem lies in the __str__ method. For example,
KeyError manages to handle