
Implementation stolen from PR davidhalter/parso#162. Thanks parso! I could add support for these newer syntactical constructs in the target version detection logic, but until I get diff-shades up and running I don't feel very comfortable adding the code.
5 lines
106 B
Python
5 lines
106 B
Python
# Unparenthesized walruses are now allowed in indices since Python 3.10.
|
|
x[a:=0]
|
|
x[a:=0, b:=1]
|
|
x[5, b:=0]
|