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

[Python-Dev] Py3k: Except clause syntax

[Python-Dev] Py3k: Except clause syntax [Python-Dev] Py3k: Except clause syntaxOleg Broytmann phd at mail2.phd.pp.ru
Fri Mar 17 21:23:45 CET 2006
On Fri, Mar 17, 2006 at 07:44:51PM +0000, John J Lee wrote:
> 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

   If parens are mandatory what is the difference from the current syntax?
Why do we need "as" here? Why not stay with

except (NameError, OtherError), e:

   ???

Oleg.
-- 
     Oleg Broytmann            http://phd.pp.ru/            phd at phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.
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