Debian Codegraph @

tests/data/cases/pep_572_py39.py

raw
1 # Unparenthesized walruses are now allowed in set literals & set comprehensions
2 # since Python 3.9
3 {x := 1, 2, 3}
4 {x4 := x**5 for x in range(7)}
5 # We better not remove the parentheses here (since it's a 3.10 feature)
6 x[(a := 1)]
7 x[(a := 1), (b := 3)]