You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Grammar/python.gram
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1331,11 +1331,11 @@ invalid_default:
1331
1331
invalid_star_etc:
1332
1332
| a='*' (')' | ',' (')' | '**')) { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, "named parameters must follow bare *") }
1333
1333
| '*' ',' TYPE_COMMENT { RAISE_SYNTAX_ERROR("bare * has associated type comment") }
1334
-
| '*' param a='=' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, "var-positional parameter's default value cannot be changed because it has the immutable default value ()") }
1334
+
| '*' param a='=' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, "var-positional parametercannot have default value, it's default valude is ()") }
RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, "* may appear only once") }
1337
1337
invalid_kwds:
1338
-
| '**' param a='=' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, "var-keyword parameter's default value cannot be changed because it has the immutable default value {}") }
1338
+
| '**' param a='=' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, "var-keyword parametercannot have default value, it's default valude is {}") }
| '*' (':' | ',' (':' | '**')) { RAISE_SYNTAX_ERROR("named parameters must follow bare *") }
1362
-
| '*' lambda_param a='=' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, "var-positional parameter's default value cannot be changed because it has the immutable default value ()") }
1362
+
| '*' lambda_param a='=' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, "var-positional parametercannot have default value, it's default valude is ()") }
RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, "* may appear only once") }
1365
1365
invalid_lambda_kwds:
1366
-
| '**' lambda_param a='=' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, "var-keyword parameter's default value cannot be changed because it has the immutable default value {}") }
1366
+
| '**' lambda_param a='=' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, "var-keyword parametercannot have default value, it's default valude is {}") }
0 commit comments