Message381187
Apparently we currently don't allow walruses in set literals either:
>>> {y := 4, 4**2, 3**3}
File "<stdin>", line 1
{y := 4, 4**2, 3**3}
^
SyntaxError: invalid syntax
But they should be allowed as well per PEP 572 (as the pep mentions all comprehensions):
There is one special case: an assignment expression occurring in a list, set or dict comprehension or in a generator expression (below collectively referred to as "comprehensions") binds the target in ... |
|
Date |
User |
Action |
Args |
2020-11-16 23:49:33 | pablogsal | set | recipients:
+ pablogsal, gvanrossum, lys.nikolaou |
2020-11-16 23:49:33 | pablogsal | set | messageid: <1605570573.34.0.154206177317.issue42381@roundup.psfhosted.org> |
2020-11-16 23:49:33 | pablogsal | link | issue42381 messages |
2020-11-16 23:49:33 | pablogsal | create | |
|