mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-28 21:30:23 +07:00
(cherry picked from commit f4b52fc04911cc80b05fc155485fa5aafcd70bf4) GitOrigin-RevId: 76b3859ef35485c1704d9d12419fae927a3989c6
8 lines
546 B
Python
8 lines
546 B
Python
<error descr="Unparenthesized assignment expressions are prohibited at the top level of an expression statement">y := f(x)</error> # INVALID
|
|
(y := f(x)) # Valid, though not recommended
|
|
|
|
y0 = <error descr="Unparenthesized assignment expressions are prohibited at the top level of the right-hand side of an assignment statement">y1 := f(x)</error> # INVALID
|
|
y0 = (y1 := f(x)) # Valid, though discouraged
|
|
|
|
class A:
|
|
[<error descr="Assignment expressions within a comprehension cannot be used in a class body">y := i</error> for i in range(2)] |