15 Jul
2019
15 Jul
'19
10:16 a.m.
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