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/2014-February/132662.html below:

[Python-Dev] PEP 463: Exception-catching expressions

[Python-Dev] PEP 463: Exception-catching expressions [Python-Dev] PEP 463: Exception-catching expressionsAntoine Pitrou solipsis at pitrou.net
Sat Feb 22 10:23:54 CET 2014
On Fri, 21 Feb 2014 19:49:20 -0700
Eric Snow <ericsnowcurrently at gmail.com> wrote:
> On Fri, Feb 21, 2014 at 7:07 PM, Victor Stinner
> <victor.stinner at gmail.com> wrote:
> >> Consider this example of a two-level cache::
> >>     for key in sequence:
> >>         x = (lvl1[key] except KeyError: (lvl2[key] except KeyError: f(key)))
> >>         # do something with x
> >
> > ... but I don't like when it is used to build complex expressions.
> 
> This is true of any expression syntax, not just this proposal--though
> some expression syntax is more apt to be abused than others: you won't
> see many multiline int literals! ;)

But this is precisely why Python has refrained from making everything
an expression. For example, why assignements are not expressions.

Regards

Antoine.


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