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

[Python-Dev] Syntax for "except"

[Python-Dev] Syntax for "except" [Python-Dev] Syntax for "except"Greg Ewing greg at cosc.canterbury.ac.nz
Tue Feb 10 19:19:32 EST 2004
"Edward C. Jones" <edcjones at erols.com>:

> Why was Python syntax designed so
>     except (TypeError, ValueError):
> is OK but
>     except [TypeError, ValueError]:
> is forbidden.

My guess would be that exception matching needs to be fast, so
special-casing for tuples is desirable, and allowing more general
sequences as well would add so little utility that it's not considered
worth the extra code.

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg at cosc.canterbury.ac.nz	   +--------------------------------------+

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