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

Andrew Dalke dalke at dalkescientific.com
Sat Mar 3 01:15:06 CET 2007

On 3/2/07, Greg Ewing <greg.ewing at canterbury.ac.nz> 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:
>     raise ExceptionClass
> or
>     raise ExceptionClass(args)
> plus optional 'with traceback' clauses in both cases.
> However, the apparent instantiation call wouldn't be
> made -- it's just part of the syntax.

Elsewhere here I listed several examples of existing
code which raises an instance which was caught or
created earlier.  That would not be supported if the
raise had to be written in your given forms.

    dalke at dalkescientific.com

More information about the Python-Dev mailing list