A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2006-March/062490.html below:

[Python-Dev] Py3k: Except clause syntax

[Python-Dev] Py3k: Except clause syntax [Python-Dev] Py3k: Except clause syntaxTerry Reedy 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 
of instance.

tjr



More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4