Re: [Python-Dev] assignment expressions: an alternative proposal

2018年4月24日 08:56:52 -0700

On 04/24/2018 08:35 AM, Yury Selivanov wrote:
Yes, it would force users to come up with better names *iff* they want
to use this new sugar:
 if (first_target = get_first_candidate()) ...
 elif (second_target = get_second_candidate()) ...
And then the common code below that only cares about a target being found now 
has to do a
 item = first_target or second_target or ...
I don't see that as an improvement.
--
~Ethan~
_______________________________________________
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