A RetroSearch Logo

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

Search Query:

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

[Python-Dev] Py3k: Except clause syntax

[Python-Dev] Py3k: Except clause syntax [Python-Dev] Py3k: Except clause syntaxBrett Cannon brett at python.org
Fri Mar 17 04:30:01 CET 2006
On 3/16/06, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> 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.

I agree.  "as" is taking on the use of assignment in statements that
are not ``=`` and I say we just keep on with that.  Plus Greg's above
explanation also makes sense to me; you are binding the exception to a
name and treating as if it was called <value>.

-Brett
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