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/2018-April/153099.html below:

[Python-Dev] (name := expression) doesn't fit the narrative of PEP 20

[Python-Dev] (name := expression) doesn't fit the narrative of PEP 20Antoine Pitrou solipsis at pitrou.net
Thu Apr 26 04:36:14 EDT 2018
On Thu, 26 Apr 2018 15:34:17 +1000
Steven D'Aprano <steve at pearwood.info> wrote:

> On Thu, Apr 26, 2018 at 05:22:58PM +1200, Greg Ewing wrote:
> > Ɓukasz Langa wrote:  
> > >What was its own assignment before
> > >now is part of the logic test. This saves on vertical whitespace but makes
> > >parsing and understanding logic tests harder.  
> > 
> > Another way to say this is that expressions are no longer
> > restricted to being trees, but can be general DAGs, which
> > require more mental effort to understand.  
> 
> Is that right? I presume you mean that there can be cycles in 
> expressions involving binding-expressions. If not, what do you mean?
> 
> Can you give an example of a Python expression, involving PEP 572 
> binding-expressions, that is not a tree but a more general DAG or that 
> contains cycles?

Depends if you mean a graph between names or values?

If between names, you can even have cycles AFAICT:

  ((a: = a + b), (b: = a))

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