summaryrefslogtreecommitdiffstats
path: root/Grammar/python.gram
diff options
context:
space:
mode:
authorPablo Galindo Salgado <Pablogsal@gmail.com>2021-08-01 01:10:50 (GMT)
committerGitHub <noreply@github.com>2021-08-01 01:10:50 (GMT)
commit208a7e957b812ad3b3733791845447677a704f3e (patch)
tree5af298f98c8ceea7d731ae14f3770e4b6e1fbdc0 /Grammar/python.gram
parentb08c48e61745666df9aeee97d8bddbf1e5550627 (diff)
downloadcpython-208a7e957b812ad3b3733791845447677a704f3e.zip
cpython-208a7e957b812ad3b3733791845447677a704f3e.tar.gz
cpython-208a7e957b812ad3b3733791845447677a704f3e.tar.bz2
bpo-34013: Don't consider a grouped expression when reporting legacy print syntax errors (GH-27521)
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 278ddfb..8a21056 100644
--- a/Grammar/python.gram
+++ b/Grammar/python.gram
@@ -1073,7 +1073,7 @@ expression_without_invalid[expr_ty]:
| disjunction
| lambdef
invalid_legacy_expression:
- | a=NAME b=star_expressions {
+ | a=NAME !'(' b=star_expressions {
_PyPegen_check_legacy_stmt(p, a) ? RAISE_SYNTAX_ERROR_KNOWN_RANGE(a, b,
"Missing parentheses in call to '%U'. Did you mean %U(...)?", a->v.Name.id, a->v.Name.id) : NULL}