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
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
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. (
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
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
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
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
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
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
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
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
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
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
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 (
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
15 matches
Mail list logo