Re: [Python-Dev] PEP 572: Assignment Expressions

2018年4月21日 11:21:08 -0700

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: [email protected]
GPG Finger: 3C76 A027 CA45 AD70 98B5 BC1D 7920 5802 880B C9D8
 
A day without sunshine is like night.
_______________________________________________
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to