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

[Python-Dev] Py3k: Except clause syntax

[Python-Dev] Py3k: Except clause syntax [Python-Dev] Py3k: Except clause syntaxGeorg Brandl g.brandl at gmx.net
Fri Mar 17 20:49:59 CET 2006
John J Lee wrote:

>> In your formulation the comma binds more tightly than the as keyword. 
>> In import statements it's the other way around.  That seems like it 
>> might be a source of confusion.
> 
> Perhaps parentheses around the exception list should be mandatory for the 
> 2-or-more exceptions case?
> 
> except NameError as e:                  --> fine
> except (NameError) as e:                --> fine
> except (NameError,) as e:               --> fine
> 
> except NameError, OtherError as e:      --> SyntaxError
> except (NameError, OtherError) as e:    --> fine

I don't like that particularly, but I guess that for consistency's sake
it would have to be done this way.

Cheers,
Georg

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