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

[Python-Dev] Assignment expression and coding style: the while True case

[Python-Dev] Assignment expression and coding style: the while True case [Python-Dev] Assignment expression and coding style: the while True caseChris Angelico rosuav at gmail.com
Wed Jul 4 20:15:02 EDT 2018
On Thu, Jul 5, 2018 at 10:03 AM, Victor Stinner <vstinner at redhat.com> wrote:
> On the 3360 for loops of the stdlib (*), I only found 2 loops which
> would benefit of assignment expressions.
>
> It's not easy to find loops which:
> - build a list,
> - are simple enough to be expressed as list comprehension,
> - use a condition (if),
> - use an expression different than just a variable name as the list
> value (value appended to the list).

Are you implying that the above conditions are essential for
assignment expressions to be useful, or that this defines one
particular way in which they can be of value? Your opening implies the
former, but I think the latter is more accurate here.

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