[Python-3000] Exception re-raising woes

Adam Olsen rhamph at gmail.com
Fri May 30 19:40:34 CEST 2008


On Fri, May 30, 2008 at 3:51 AM, Antoine Pitrou <solipsis at pitrou.net> wrote:
>
> Hi,
>
> I'm surprised that nobody except Robert Brewer reacted to my proposal. The two
> relevant bugs (#2507 and #2833) have been marked respectively as "critical" and
> "release blocker", so I thought at least some people felt concerned :-)

Flip side of the bikeshed effect.  Nobody feels confident in their
understanding so nobody comments.


> Should I wait a bit for people to react and give a qualified opinion, or should
> I assume one of the following implicit answers (and if so, which one!):
>
> - we don't really care about re-raising, just fix #2507 the simple way so that
> exception state is properly cleaned up
> - we must fix both #2507 and #2833 in a clean way, and your proposal looks fine
> - we must fix both #2507 and #2833 in a clean way, but your proposal is
> completely bogus

I'd like if a bare "raise" became purely lexical (as Guido just
suggested), ditching all the magic.

However, things such as pdb.pm() still need access to the last
exception.  Maybe we can pare it down the bare minimum, a per-thread
last_exception?  That'd quickly get clobbered (we should intentionally
clear when leaving an except block), but is that ever a problem?


-- 
Adam Olsen, aka Rhamphoryncus


More information about the Python-3000 mailing list