mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
bpo-34013: Don't consider a grouped expression when reporting legacy print syntax errors (GH-27521)
This commit is contained in:
parent
b08c48e617
commit
208a7e957b
3 changed files with 17 additions and 6 deletions
|
@ -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}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue