We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d7b9ea5 commit 185ce34Copy full SHA for 185ce34
Grammar/python.gram
@@ -1261,6 +1261,9 @@ invalid_expression:
1261
RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b, "t-string: lambda expressions are not allowed without parentheses") }
1262
1263
invalid_named_expression(memo):
1264
+ | '(' a=NAME ')' ':=' expression {
1265
+ RAISE_SYNTAX_ERROR_KNOWN_LOCATION(
1266
+ a, "cannot parenthesize target name in assignment expression") }
1267
| a=expression ':=' expression {
1268
RAISE_SYNTAX_ERROR_KNOWN_LOCATION(
1269
a, "cannot use assignment expressions with %s", _PyPegen_get_expr_name(a)) }
0 commit comments