How to pop the interpreter's stack?
Ethan Furman
ethan at stoneleaf.us
Sun Dec 26 12:08:08 EST 2010
Steven D'Aprano wrote:
> On Sat, 25 Dec 2010 09:17:27 -0500, Robert Kern wrote:
>
>> On 12/24/10 5:14 PM, Ethan Furman wrote:
>>
>>> There are also times when I change the exception being raised to match
>>> what python expects from that type of object -- for example, from
>>> WhatEverException to KeyError for a dict-like object. So in this regard
>>> I agree with Steven.
>> Steven isn't arguing that particular point here, nor is anyone arguing
>> against it.
>
> Emphasis on *here*.
>
> You will note that in Python 3, if you raise an exception inside an
> except block, both the *original* and the new exception are printed. This
> is great for fixing bugs inside except blocks, but terribly disruptive
> for catching one error and raising another error in it's place...
Yes, this is where I was agreeing with Steven. While I love python3,
the current nested exception behavior is horrible.
~Ethan~
More information about the Python-list
mailing list