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

[Python-Dev] Py3k: Except clause syntax

[Python-Dev] Py3k: Except clause syntax [Python-Dev] Py3k: Except clause syntaxMichael Urman murman at gmail.com
Thu Mar 16 15:57:37 CET 2006
On 3/16/06, Georg Brandl <g.brandl at gmx.net> wrote:
> +1. Fits well with the current use of "as".

I like it, but wonder about the false parallels below. My initial
reaction is it's not worth worrying about as it's easy to learn as
part of the import or except statements, and should do the right
thing. Nobody would expect the second import to rename both items to
q, and the first except clause would be a SyntaxError.

    from foo import bar as b, quux as q
    except TypeError as te, IndexError as ie

    from foo import bar, quux as q
    except TypeError, IndexError as e

Michael
--
Michael Urman  http://www.tortall.net/mu/blog
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