On 15/07/2019 16:18, Fabrizio Messina wrote:
Hello,
It is likely not the first time such a proposal is being made but let's
see.
I would like to explicitly set variable names in list comprehensions using
a where keyword, eventually set after the if keyword:
This is what assignment expressions (PEP 572) are for
(https://www.python.org/dev/peps/pep-0572/). Personally I would have
preferred something much more limited like your keyword, but that
argument was lost a long time ago now.
--
Rhodri James *-* Kynesim Ltd
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/[email protected]/message/WAXB2CXHLNNUC6FUZVXDKQPLWDMWNV6F/
Code of Conduct: http://python.org/psf/codeofconduct/