bpo-42381: Allow walrus in set literals and set comprehensions (GH-23332)

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
This commit is contained in:
Pablo Galindo 2020-11-17 01:17:12 +00:00 committed by GitHub
parent a57b3d30f6
commit b0aba1fcdc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 1680 additions and 1790 deletions

File diff suppressed because it is too large Load diff