mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-07 22:09:38 +07:00
Now it more follows original python grammar. GitOrigin-RevId: 199f30b819c85a4eba5cab9b3f67fbf1bb7f18b6
18 lines
340 B
Python
18 lines
340 B
Python
# Parenthesis everywhere because
|
|
# unparenthesized assignment expressions are prohibited
|
|
# at the top level of an expression statement
|
|
|
|
(x := y := z := 0)
|
|
|
|
(a[i] := x)
|
|
(self.rest := [])
|
|
|
|
(p: Optional[int] := None)
|
|
|
|
(b := -)
|
|
(x := )
|
|
|
|
x = (b[j] := z) = 'spam' # z is a reference
|
|
|
|
[x1 for x1 := 2 in (1, 2, 3)]
|
|
[x1 for (x1 := 2) in (1, 2, 3)] |