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

2007-02-10 Thread Nick Coghlan
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 mu

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

2007-02-10 Thread Phillip J. Eby
At 10:52 PM 2/9/2007 -0600, Collin Winter wrote: >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} >> > > at

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

2007-02-10 Thread Guido van Rossum
Why don't you want it to mutate the instance? On 2/10/07, Nick Coghlan <[EMAIL PROTECTED]> 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 langu

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

2007-02-10 Thread Guido van Rossum
WFM. On 2/10/07, Phillip J. Eby <[EMAIL PROTECTED]> wrote: > At 10:52 PM 2/9/2007 -0600, Collin Winter wrote: > >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_i

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

2007-02-10 Thread Collin Winter
On 2/10/07, Nick Coghlan <[EMAIL PROTECTED]> 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 > > w

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

2007-02-10 Thread Brett Cannon
On 2/10/07, Guido van Rossum <[EMAIL PROTECTED]> wrote: > WFM. > Wow, I think that is the shortest way you can OK an idea, Guido, without just leaving off the period. =) And for what it's worth, I'm +1 on adding default args and passing a single argument in Py3K and all three in 2.6 as well. -B

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

2007-02-10 Thread Collin Winter
On 2/10/07, Phillip J. Eby <[EMAIL PROTECTED]> wrote: > At 10:52 PM 2/9/2007 -0600, Collin Winter wrote: > >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()

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

2007-02-10 Thread Nick Coghlan
Collin Winter wrote: > On 2/10/07, Phillip J. Eby <[EMAIL PROTECTED]> wrote: >> My thought is, 2.6 would pass all three arguments, 3.0 just one. > > My only concern was that keeping the three-argument signature means > one less thing to change when transitioning to 3.0. Anyone really > concerned a

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

2007-02-10 Thread Nick Coghlan
Guido van Rossum wrote: > Why don't you want it to mutate the instance? The recent repeat of the API discussion about list.sort() & list.reversed() (mutate instance & return None) vs sorted() and reversed() (return new instance). I'm trying to see why mutating & returning self would be OK here,

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

2007-02-10 Thread Guido van Rossum
Somehow it seems that exceptions keep getting permission to violate the rules... (E.g. the insistence on a fixed base class is also considered unpythonic in other contexts.) Maybe it's because they're "exceptions" ? :-) Anyway, I believe there's a use case for re-raising an existing exception with

Re: [Python-3000] how should we handle changes to the C API?

2007-02-10 Thread Guido van Rossum
On 1/29/07, Brett Cannon <[EMAIL PROTECTED]> wrote: > I was more generally wondering what the plan was for transitioning any > C API changes (if we were even going to do that level of transition). It's too early for much of a plan IMO. I'm not making radical changes (yet) but I'm mercilessly delet