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

Collin Winter collinw at gmail.com
Sat Feb 10 23:31:48 CET 2007


On 2/10/07, Nick Coghlan <ncoghlan at gmail.com> wrote:
> Collin Winter wrote:
> > I think so. I've already got language ready for the section on using
> > BaseException.with_traceback() in the 2->3 raise translations, and
> > I'll work up additional language for the transition plan sometime this
> > weekend.
>
> If with_traceback() is an instance method, does it mutate the existing
> exception or create a new one?

I say it mutates the instance.

> To avoid any confusion, perhaps it should instead be a class method
> equivalent to the following:
>
[snip]
>
> Usage would look like:
>
>    raise E.with_traceback(T, V)

What confusion do you foresee?

Collin Winter


More information about the Python-3000 mailing list