[Python-Dev] PEP 293, Codec Error Handling Callbacks
Walter Dörwald
walter@livinglogic.de
Wed, 14 Aug 2002 12:47:47 +0200
Martin v. Loewis wrote:
> "M.-A. Lemburg" <mal@lemburg.com> writes:
>
>>What ? That exceptions are immutable ? I think it's a big win that
>>exceptions are in fact mutable -- they are great for transporting
>>extra information up the chain...
>
>
> I see. So this is an open issue.
Yes, but I think this is not that much of a problem, because when
the code that catches the exception wants to do something with
exc.args it has to know what the entries mean, which depends on
the type. And if this code knows that it is dealing with a
UnicodeEncodeError it can simply use exc.start instead of
exc.args[2].
Bye,
Walter Dörwald