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/153234.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 20 [Python-Dev] (name := expression) doesn't fit the narrative of PEP 20Chris Angelico rosuav at gmail.com
Sat Apr 28 07:37:22 EDT 2018
On Sat, Apr 28, 2018 at 9:18 PM, Ned Batchelder <ned at nedbatchelder.com> wrote:
> It's entirely true that binding expressions don't change this situation at
> all, EXCEPT that the entire point of binding expressions is to be able to
> express in one statement what used to take more than one.  With binding
> expressions, actions may be coverage-hidden within one statement that
> without them would have been coverage-visible in more than one statement.

So far, all the examples in the PEP have the exact same coverage with
and without assignment expressions, with a few exceptions where
coverage is *improved* by them (where the alternative is to duplicate
a function call). By combining multiple lines into one, we also ensure
that all of it is executed exactly once, instead of having conditional
execution.

ChrisA
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