[Python-3000] Exception re-raising woes
Guido van Rossum
guido at python.org
Fri May 30 20:28:59 CEST 2008
On Fri, May 30, 2008 at 10:40 AM, Adam Olsen <rhamph at gmail.com> wrote:
> 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?
No, pdb.pm() uses sys.last_*, not sys.exc_*. This is three variables
set only when an unhandled exception reaches the interactive prompt
and prints a traceback there. So no worries.
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-3000
mailing list