summaryrefslogtreecommitdiffstats
path: root/Grammar
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2021-08-01 01:31:44 (GMT)
committerGitHub <noreply@github.com>2021-08-01 01:31:44 (GMT)
commit35035bc35a9cb8617ab9fe9aac38aaf67c926aef (patch)
tree2e38ea548c1baa345afb23550f658f05f54f8b24 /Grammar
parent76903ff9ce2d28f542c44ba97aa043dde8b55daa (diff)
downloadcpython-35035bc35a9cb8617ab9fe9aac38aaf67c926aef.zip
cpython-35035bc35a9cb8617ab9fe9aac38aaf67c926aef.tar.gz
cpython-35035bc35a9cb8617ab9fe9aac38aaf67c926aef.tar.bz2
bpo-34013: Don't consider a grouped expression when reporting legacy print syntax errors (GH-27521)
(cherry picked from commit 208a7e957b812ad3b3733791845447677a704f3e) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Diffstat (limited to 'Grammar')
-rw-r--r--Grammar/python.gram2
1 files changed, 1 insertions, 1 deletions
diff --git a/Grammar/python.gram b/Grammar/python.gram
index 70f2de8..057bcb6 100644
--- a/Grammar/python.gram
+++ b/Grammar/python.gram
@@ -849,7 +849,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}