[Python-Dev] Py3k: Except clause syntax
tjreedy at udel.edu
Fri Mar 17 03:22:17 CET 2006
"Greg Ewing" <greg.ewing at canterbury.ac.nz> wrote in message
news:441A0714.7040200 at canterbury.ac.nz...
> Baptiste Carvello wrote:
>> what about
>> except <type> with <value>:
>> a program dies "with" an error message, not "as" an error message.
> No. The exception object you're catching *is* the value,
> not something which *has* a value. I maintain that "as"
> is the correct word to use here.
Besides which, 'with' is a (new) main (compound statement) keyword while
'as' is always subordinate and denoting a name to be used in the sequel.
And I also like using it to separate classes to be caught from name binding
More information about the Python-Dev