On 14/05/18 10:17, Greg Ewing wrote:
Tim Peters wrote:
Because you never _need_ to use an assignment expression to write a
listcomp/genexp.

This whole discussion started because someone wanted a way
to bind a temporary result for use *within* a comprehension.

I still don't find that argument compelling. If you have a sufficiently complicated comprehension that you need a temporary result bound, IMHO you are well on the way to (if not far past) the point where converting it into a more traditional for-loop will be much clearer. I'm not sure we should be encouraging people to write less clear code.

--
Rhodri James *-* Kynesim Ltd
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to