On 2/9/07, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> On 2/9/07, Greg Ewing <[EMAIL PROTECTED]> 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.)

The current 3-argument form of "raise" is used incredibly rarely
(compared to other raise forms), so I don't see a need for this kind
of syntactic support. Also, adding a "with" clause like that means we
have to hash out whether it goes in front of "from" (in "raise ...
from ...") or after it, etc, etc, and that's just begging for
100+-post bikeshedding threads.

Collin Winter
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to