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/2004-February/042477.html below:

[Python-Dev] Syntax for "except"

[Python-Dev] Syntax for "except" [Python-Dev] Syntax for "except"Guido van Rossum guido at python.org
Tue Feb 10 11:51:09 EST 2004
> Why was Python syntax designed so
>     except (TypeError, ValueError):
> is OK but
>     except [TypeError, ValueError]:
> is forbidden. Should this be changed? Is immutability needed here? Where 
> in Python is immutability really needed or really improves efficiency?

I never *intended* this to be seen as a container, but rather as a use
of parentheses for grouping.

If I were to revise the syntax, I would probably change it around
completely to avoid the common mistake of writing

  except TypeError, ValueError: ...

(but I don't have a proposal).

--Guido van Rossum (home page: http://www.python.org/~guido/)

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