[Python-3000] remove tuple exceptions?

2007-03-02 Thread Jim Jewett
What is the reasoning behind allowing the raise of a tuple -- but really only raising its (recursively) first element? It seems to have been added (with different spelling) in 1991 (rev 2625) as the only alternative to string exceptions. (You couldn't raise a class or instance.) I assume it was

Re: [Python-3000] remove tuple exceptions?

2007-03-02 Thread Jean-Paul Calderone
On Fri, 2 Mar 2007 16:35:38 -0500, Jim Jewett <[EMAIL PROTECTED]> wrote: >What is the reasoning behind allowing the raise of a tuple -- but >really only raising its (recursively) first element? > This, basically: SomeCondition = (FooException, BarException) AnotherCondition = (SomeConditio

Re: [Python-3000] remove tuple exceptions?

2007-03-02 Thread Collin Winter
On 3/2/07, Jim Jewett <[EMAIL PROTECTED]> wrote: > What is the reasoning behind allowing the raise of a tuple -- but > really only raising its (recursively) first element? > > It seems to have been added (with different spelling) in 1991 (rev > 2625) as the only alternative to string exceptions. (

Re: [Python-3000] remove tuple exceptions?

2007-03-02 Thread Greg Ewing
Jean-Paul Calderone wrote: > On Fri, 2 Mar 2007 16:35:38 -0500, Jim Jewett <[EMAIL PROTECTED]> wrote: > >>What is the reasoning behind allowing the raise of a tuple > >SomeCondition = (FooException, BarException) >AnotherCondition = (SomeCondition, BazException) > >except SomeCondition

Re: [Python-3000] remove tuple exceptions?

2007-03-02 Thread Guido van Rossum
On 3/2/07, Greg Ewing <[EMAIL PROTECTED]> wrote: > So it was some sort of workaround for exceptions not > being classes? If so, it sounds like we don't need > it any more. Right. I added it to be able to do something like create classes of exceptions when all we had was string exceptions. Definite

Re: [Python-3000] How far to go with cleaning up exceptions

2007-03-02 Thread Collin Winter
On 3/1/07, Brett Cannon <[EMAIL PROTECTED]> wrote: > I spent my sprint time cleaning up exceptions for Py3K and Guido > suggested I run some things by the group to make sure they don't make > transitioning from 2.6 too difficult. After adding the proper > restrictions in terms of what can and cann

[Python-3000] PEP 3113 (Removal of Tuple Parameter Unpacking)

2007-03-02 Thread Brett Cannon
Those of you who attended PyCon 2007 probably know what PEP 3113 is all about: the removal of the automatic unpacking of sequence arguments when a tuple parameter is present in a function's signature (e.g., the ``(b, c)`` in ``def fxn(a, (b, c), d): pass``). Thanks to everyone who helped provide a

Re: [Python-3000] How far to go with cleaning up exceptions

2007-03-02 Thread Brett Cannon
On 3/2/07, Collin Winter <[EMAIL PROTECTED]> wrote: > On 3/1/07, Brett Cannon <[EMAIL PROTECTED]> wrote: > > I spent my sprint time cleaning up exceptions for Py3K and Guido > > suggested I run some things by the group to make sure they don't make > > transitioning from 2.6 too difficult. After ad

Re: [Python-3000] PEP 3113 (Removal of Tuple Parameter Unpacking)

2007-03-02 Thread Guido van Rossum
I am all for this; I don't think the advantage it has for the small minority of fans is all that big. Has anyone tried to create a 2to3 transformer for this? I think it should be possible, although there are a few warts (like inserting the new code after the docstring, and how to come up with name

Re: [Python-3000] PEP 3113 (Removal of Tuple Parameter Unpacking)

2007-03-02 Thread Collin Winter
On 3/2/07, Guido van Rossum <[EMAIL PROTECTED]> wrote: > Has anyone tried to create a 2to3 transformer for this? I think it > should be possible, although there are a few warts (like inserting the > new code after the docstring, and how to come up with names for the > anonymous tuple(s), and having

Re: [Python-3000] PEP 3113 (Removal of Tuple Parameter Unpacking)

2007-03-02 Thread Guido van Rossum
On 3/2/07, Collin Winter <[EMAIL PROTECTED]> wrote: > On 3/2/07, Guido van Rossum <[EMAIL PROTECTED]> wrote: > > Has anyone tried to create a 2to3 transformer for this? I think it > > should be possible, although there are a few warts (like inserting the > > new code after the docstring, and how to

Re: [Python-3000] How far to go with cleaning up exceptions

2007-03-02 Thread Nick Coghlan
Brett Cannon wrote: > I think the slice removal is easy. But getting rid of 'args' and > making BaseException's constructor only take a single argument is not > painless. But a warning should help get this done in a reasonable > fashion. The exception slicing is the only thing I ever thought was

Re: [Python-3000] How far to go with cleaning up exceptions

2007-03-02 Thread Brett Cannon
On 3/2/07, Nick Coghlan <[EMAIL PROTECTED]> wrote: > Brett Cannon wrote: > > I think the slice removal is easy. But getting rid of 'args' and > > making BaseException's constructor only take a single argument is not > > painless. But a warning should help get this done in a reasonable > > fashion

Re: [Python-3000] PEP 3113 (Removal of Tuple Parameter Unpacking)

2007-03-02 Thread Collin Winter
On 3/2/07, Guido van Rossum <[EMAIL PROTECTED]> wrote: > On 3/2/07, Collin Winter <[EMAIL PROTECTED]> wrote: > > On 3/2/07, Guido van Rossum <[EMAIL PROTECTED]> wrote: > > > Has anyone tried to create a 2to3 transformer for this? I think it > > > should be possible, although there are a few warts (

Re: [Python-3000] PEP 3113 (Removal of Tuple Parameter Unpacking)

2007-03-02 Thread Guido van Rossum
Very cool. This should make the PEP a complete success! On 3/2/07, Collin Winter <[EMAIL PROTECTED]> wrote: > On 3/2/07, Guido van Rossum <[EMAIL PROTECTED]> wrote: > > On 3/2/07, Collin Winter <[EMAIL PROTECTED]> wrote: > > > On 3/2/07, Guido van Rossum <[EMAIL PROTECTED]> wrote: > > > > Has anyo