Skip to content

[3.9] bpo-40334: Produce better error messages for non-parenthesized genexps (GH-20153) #20307

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 22, 2020

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented May 22, 2020

The error message, generated for a non-parenthesized generator expression
in function calls, was still the generic invalid syntax, when the generator expression wasn't appearing as the first argument in the call. With this patch, even on input like f(a, b, c for c in d, e), the correct error message gets produced.
(cherry picked from commit ae14583)

Co-authored-by: Lysandros Nikolaou [email protected]

https://bugs.python.org/issue40334

pythonGH-20153)

The error message, generated for a non-parenthesized generator expression
in function calls, was still the generic `invalid syntax`, when the generator expression wasn't appearing as the first argument in the call. With this patch, even on input like `f(a, b, c for c in d, e)`, the correct error message gets produced.
(cherry picked from commit ae14583)

Co-authored-by: Lysandros Nikolaou <[email protected]>
@miss-islington
Copy link
Contributor Author

@lysnikolaou and @pablogsal: Status check is done, and it's a success ✅ .

@miss-islington miss-islington merged commit 55c8923 into python:3.9 May 22, 2020
@miss-islington miss-islington deleted the backport-ae14583-3.9 branch May 22, 2020 01:15
@miss-islington
Copy link
Contributor Author

@lysnikolaou and @pablogsal: Status check is done, and it's a success ✅ .

1 similar comment
@miss-islington
Copy link
Contributor Author

@lysnikolaou and @pablogsal: Status check is done, and it's a success ✅ .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants