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/062607.html below:

[Python-Dev] Py3k: Except clause syntax

[Python-Dev] Py3k: Except clause syntax [Python-Dev] Py3k: Except clause syntaxGreg Ewing greg.ewing at canterbury.ac.nz
Sun Mar 19 02:49:57 CET 2006
Wolfgang Langner wrote:

> try:
>   something
> except NameError or OtherError as e:

I don't see that this really helps anything,
since it's no clearer how "or" and "as" should
bind than it is how "," and "as" should bind.

Also it has the disadvantage that

   except E1 or E2 as e:

would *not* be equivalent to

   except (E1 or E2) as e:

On the other hand, in

   except E1, E2 as e:

the E1, E2 is just a tuple expression, so it's
exactly equivalent to

   except (E1, E2) as e:

Greg

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