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

[Python-Dev] PEP 572: Assignment Expressions

[Python-Dev] PEP 572: Assignment Expressions [Python-Dev] PEP 572: Assignment ExpressionsMatěj Cepl mcepl at cepl.eu
Sat Apr 21 13:53:42 EDT 2018
On 2018-04-21, 07:46 GMT, Chris Angelico wrote:
> doubled_items = [x for x in (items := get_items()) if x * 2 in 
> items]

Aside from other concerns expressed elsewhere by other people, 
do you really like this? I know and agree that “readability” is 
a subjective term, but it is my firm persuasion that whenever 
I need to think about what particular list comprehension means, 
it is the moment I should write a separate function or normal 
cycle. I think we should encourage writing simple (I didn’t use 
the r* word here, you see!) code than something which has 
potential to slide us towards Perl.

Best,

Matěj
-- 
https://matej.ceplovi.cz/blog/, Jabber: mcepl at ceplovi.cz
GPG Finger: 3C76 A027 CA45 AD70 98B5  BC1D 7920 5802 880B C9D8
 
A day without sunshine is like night.

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