Skip to content
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

[3.9] bpo-40334: Produce better error messages on invalid targets (GH-20106) #20973

Merged
merged 2 commits into from
Jun 19, 2020

Conversation

lysnikolaou
Copy link
Member

@lysnikolaou lysnikolaou commented Jun 18, 2020

The following error messages get produced:

  • cannot delete ... for invalid del targets
  • ... is an illegal 'for' target for invalid targets in for
    statements
  • ... is an illegal 'with' target for invalid targets in
    with statements

Additionally, a few cuts were added in various places before the
invocation of the invalid_* rule, in order to speed things
up.

Co-authored-by: Pablo Galindo [email protected]
(cherry picked from commit 01ece63)

https://bugs.python.org/issue40334

…-20106)

The following error messages get produced:
- `cannot delete ...` for invalid `del` targets
- `... is an illegal 'for' target` for invalid targets in for
  statements
- `... is an illegal 'with' target` for invalid targets in
  with statements

Additionally, a few `cut`s were added in various places before the
invocation of the `invalid_*` rule, in order to speed things
up.

Co-authored-by: Pablo Galindo <[email protected]>
(cherry picked from commit 01ece63)
@pablogsal pablogsal merged commit a5442b2 into python:3.9 Jun 19, 2020
@lysnikolaou lysnikolaou deleted the backport-01ece63-3.9 branch June 19, 2020 07:52
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.

4 participants