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

[Python-Dev] Py3k: Except clause syntax

[Python-Dev] Py3k: Except clause syntaxRon Adam rrr at ronadam.com
Mon Mar 20 19:49:19 CET 2006
skip at pobox.com wrote:
>     Skip> There seem to be other places where Python is beginning to require
>     Skip> parens even though they aren't strictly necessary to resolve
>     Skip> syntactic ambiguity.
> 
>     Guido> In the style guide only, I hope.
> 
>     Alex> Technically, I believe the first place where this did not apply
>     Alex> was list comprehensions, ...
> 
> This was the instance I was thinking of, but it was far enough back that I
> didn't remember if it was for readability or disambiguation.

There is also the cases of types needing parens such as tuple((1,2,3)). 
   The same is true for dict, list, and sets.  They could have been 
written to accept individual items, (not a suggestion as it is slower), 
so requiring tuples, sets, and/or sequences where they are used as such 
isn't unexpected.

But as long as I can do the following I will be happy.

    some_exc_group = (some_except, some_except, some_except)

    try:
       ...
    except excgroup as value:
       ...

Cheers,
    Ron


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