Re: [Python-3000] Pre-peps on raise and except changes (was: Warning for 2.6 and greater)

2007-02-09 Thread Collin Winter
The raise- and except-related PEPs from this discussion have been committed as PEP 3109 and PEP 3110, respectively. Thanks, everyone! Collin Winter ___ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 U

Re: [Python-3000] Pre-peps on raise and except changes (was: Warning for 2.6 and greater)

2007-02-09 Thread Georg Brandl
Collin Winter schrieb: > The raise- and except-related PEPs from this discussion have been > committed as PEP 3109 and PEP 3110, respectively. One question: will there be an exception keyword argument to set the traceback, to simplify e = Error(V) e.__traceback__ = tb raise e to raise Error(V,

Re: [Python-3000] Pre-peps on raise and except changes (was: Warning for 2.6 and greater)

2007-02-09 Thread Guido van Rossum
I agree that this API is better. If it's not in PEP 344 it should be added. On 2/9/07, Georg Brandl <[EMAIL PROTECTED]> wrote: > Collin Winter schrieb: > > The raise- and except-related PEPs from this discussion have been > > committed as PEP 3109 and PEP 3110, respectively. > > One question: will

Re: [Python-3000] Pre-peps on raise and except changes (was: Warning for 2.6 and greater)

2007-02-09 Thread Collin Winter
> On 2/9/07, Georg Brandl <[EMAIL PROTECTED]> wrote: > > One question: will there be an exception keyword argument to set the > > traceback, to simplify > > > > e = Error(V) > > e.__traceback__ = tb > > raise e > > > > to > > > > raise Error(V, traceback=tb) > > > > I remember this being proposed,

Re: [Python-3000] Pre-peps on raise and except changes (was: Warning for 2.6 and greater)

2007-02-09 Thread Guido van Rossum
On 2/9/07, Collin Winter <[EMAIL PROTECTED]> wrote: > > On 2/9/07, Georg Brandl <[EMAIL PROTECTED]> wrote: > > > One question: will there be an exception keyword argument to set the > > > traceback, to simplify > > > > > > e = Error(V) > > > e.__traceback__ = tb > > > raise e > > > > > > to > > > >

Re: [Python-3000] Pre-peps on raise and except changes (was: Warning for 2.6 and greater)

2007-02-09 Thread Phillip J. Eby
At 02:57 PM 2/9/2007 -0800, Guido van Rossum wrote: > > On 2/9/07, Guido van Rossum <[EMAIL PROTECTED]> wrote: > > > I agree that this API is better. If it's not in PEP 344 it should be > added. > > > > Should this be added to PEP 344 or 3109? That is, do you want to see > > it before Python 3? >

Re: [Python-3000] Pre-peps on raise and except changes (was: Warning for 2.6 and greater)

2007-02-09 Thread Collin Winter
On 2/9/07, Phillip J. Eby <[EMAIL PROTECTED]> wrote: > At 02:57 PM 2/9/2007 -0800, Guido van Rossum wrote: > > > On 2/9/07, Guido van Rossum <[EMAIL PROTECTED]> wrote: > > > > I agree that this API is better. If it's not in PEP 344 it should be > > added. > > > > > > Should this be added to PEP 344

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

2007-02-09 Thread Greg Ewing
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

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

2007-02-09 Thread Guido van Rossum
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

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

2007-02-09 Thread Phillip J. Eby
At 01:33 PM 2/10/2007 +1300, Greg Ewing 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? That *i

Re: [Python-3000] Pre-peps on raise and except changes (was: Warning for 2.6 and greater)

2007-02-09 Thread Guido van Rossum
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 uncomfortable with keeping it. Maybe in "3.0 compatibility mode" 2.6 could attach tracebacks to excep

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

2007-02-09 Thread Collin Winter
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

Re: [Python-3000] Pre-peps on raise and except changes (was: Warning for 2.6 and greater)

2007-02-09 Thread Guido van Rossum
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 uncomfortable with keeping (of cours

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

2007-02-09 Thread Guido van Rossum
On 2/9/07, Phillip J. Eby <[EMAIL PROTECTED]> wrote: > At 01:33 PM 2/10/2007 +1300, Greg Ewing 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 > >var

Re: [Python-3000] Pre-peps on raise and except changes (was: Warning for 2.6 and greater)

2007-02-09 Thread Collin Winter
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

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

2007-02-09 Thread Collin Winter
On 2/9/07, Guido van Rossum <[EMAIL PROTECTED]> wrote: > On 2/9/07, Phillip J. Eby <[EMAIL PROTECTED]> wrote: > > At 01:33 PM 2/10/2007 +1300, Greg Ewing wrote: > > >Collin Winter wrote: > > > > > > > I believe the original proposal was something like > > > > > > > > raise E(V).with_traceback(T) >

Re: [Python-3000] Pre-peps on raise and except changes (was: Warning for 2.6 and greater)

2007-02-09 Thread Phillip J. Eby
At 05:03 PM 2/9/2007 -0800, Guido van Rossum 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 uncomfortable with keeping >it. Maybe in "

Re: [Python-3000] Pre-peps on raise and except changes (was: Warning for 2.6 and greater)

2007-02-09 Thread Collin Winter
On 2/9/07, Phillip J. Eby <[EMAIL PROTECTED]> wrote: > At 05:03 PM 2/9/2007 -0800, Guido van Rossum 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, bu