cpython/Grammar
Pablo Galindo 87c87b5bd6
[3.9] bpo-42381: Allow walrus in set literals and set comprehensions (GH-23332) (GH-23333)
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 b0aba1fcdc)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2020-11-18 23:44:30 +00:00
..
Grammar bpo-39702: Relax grammar restrictions on decorators (PEP 614) (GH-18570) 2020-03-03 14:25:44 -08:00
Tokens bpo-35975: Support parsing earlier minor versions of Python 3 (GH-12086) 2019-03-07 12:38:08 -08:00
python.gram [3.9] bpo-42381: Allow walrus in set literals and set comprehensions (GH-23332) (GH-23333) 2020-11-18 23:44:30 +00:00