[Python-3000] Pre-peps on raise and except changes

Guido van Rossum guido at python.org
Sat Feb 10 01:41:22 CET 2007


On 2/9/07, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> Collin Winter wrote:
>
> > I believe the original proposal was something like
> >
> > raise E(V).with_traceback(T)
>
> Does this mean you're not intending to have any syntactic
> variant of the raise statement that includes a traceback
> in 3.0? Or is this just so that forward-compatible code
> can be written in 2.6?
>
> If you wanted a distinctive syntax, it could be something
> like
>
>    raise e with t

I can see uses for endowing an exception object with a traceback
without raising it (yet), so we'd still need the method; since we have
the method I'm not sure that we need syntax; I don't expect this to be
needed a lot. (Isn't there also a proposal for automatic exception
chaining? That might mean we'll need this even less.)

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-3000 mailing list