summaryrefslogtreecommitdiffstats
path: root/Grammar/python.gram
diff options
context:
space:
mode:
Diffstat (limited to 'Grammar/python.gram')
-rw-r--r--Grammar/python.gram2
1 files changed, 1 insertions, 1 deletions
diff --git a/Grammar/python.gram b/Grammar/python.gram
index 64e205e..0e12b5c 100644
--- a/Grammar/python.gram
+++ b/Grammar/python.gram
@@ -633,7 +633,7 @@ invalid_arguments:
RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, "Generator expression must be parenthesized") }
| a=args ',' args { _PyPegen_arguments_parsing_error(p, a) }
invalid_kwarg:
- | a=expression '=' {
+ | !(NAME '=') a=expression b='=' {
RAISE_SYNTAX_ERROR_KNOWN_LOCATION(
a, "expression cannot contain assignment, perhaps you meant \"==\"?") }
invalid_named_expression: