mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
Currently walruses are not allowerd in set literals and set comprehensions:
>>> {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.
(cherry picked from commit
|
||
|---|---|---|
| .. | ||
| parse.c | ||
| parse_string.c | ||
| parse_string.h | ||
| peg_api.c | ||
| pegen.c | ||
| pegen.h | ||