Re: [Python-Dev] Another traceback idea [was: except Exception as err, tb]

2007-03-02 Thread Guido van Rossum
On 3/2/07, Andrew Dalke <[EMAIL PROTECTED]> wrote: > On 3/2/07, Greg Ewing <[EMAIL PROTECTED]> wrote: > > This has given me another idea: >... > > Now, I'm not proposing that the raise statement should > > actually have the above syntax -- that really would be > > a step backwards. Instead it w

Re: [Python-Dev] Another traceback idea [was: except Exception as err, tb]

2007-03-02 Thread Andrew Dalke
On 3/2/07, Greg Ewing <[EMAIL PROTECTED]> wrote: > This has given me another idea: ... > Now, I'm not proposing that the raise statement should > actually have the above syntax -- that really would be > a step backwards. Instead it would be required to have > one of the following forms: > >

Re: [Python-Dev] Another traceback idea [was: except Exception as err, tb]

2007-03-02 Thread Greg Ewing
[EMAIL PROTECTED] wrote: > Why not just allow both exception classes and exception instances to be > raised, and only instantiate-at-catch in the case of a raise of a class > and a catch with an "as" clause? Because that doesn't solve the problem of pre-instantiated exceptions. What I'm proposing

Re: [Python-Dev] Another traceback idea [was: except Exception as err, tb]

2007-03-02 Thread dustin
On Sat, Mar 03, 2007 at 11:00:53AM +1300, Greg Ewing wrote: > Now, I'm not proposing that the raise statement should > actually have the above syntax -- that really would be > a step backwards. Instead it would be required to have > one of the following forms: > > raise ExceptionClass > > or

[Python-Dev] Another traceback idea [was: except Exception as err, tb]

2007-03-02 Thread Greg Ewing
Nick Maclaren wrote: > The instance contains all of the information about the details, such > as the exact operation, the values and the context (including the > traceback). It CAN'T be an object, because it is not 'assignable' > (i.e. a value) - it is inherently bound to its context. You can >