On 2/9/07, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> On 2/9/07, Collin Winter <[EMAIL PROTECTED]> wrote:
> > sys.exc_info() will be kept, while the sys.exc_{type,value,traceback}
> > attributes will be dropped.
>
> I understand why, but that doesn't make me comfortable with keeping
> it. Maybe in "3.0 compatibility mode" 2.6 could attach tracebacks to
> exception objects so we could be weened off it in 2.6?

That would imply that 2.6's "3.0 compatibility mode" would also
activate the cleanup semantics for "except" clauses. Switching that
kind of deep, subtle functionality on or off based on a command-line
switch makes me uncomfortable. There would also have to be a way of
distinguishing .pyc files produced by 2.6 versus those produced by 2.6
in 3.0-mode (since the cleanup semantics are implemented by emitting
extra bytecode for the implicit inner try/finally block).

> > As an aside, should sys.exc_clear() be added to the to-drop list? Is
> > there still a need for it given Python 3's exception cleanup
> > semantics?
>
> I don't think so -- AFAIK the same use case is handled well enough by
> the cleanup semantics of the except clause.

I've added sys.exc_clear()'s demise to PEP 3100.

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