Skip to content

Conversation

@pablogsal
Copy link
Member

@pablogsal pablogsal commented Nov 10, 2018

As commented initially in bpo-33878, the fact that expressions like
(x) = 42 are accepted is, in reality, an implementation detail and
they should be disallowed.

I am not sure if this is the cleanest/simplest implementation...if you think there is a better way to do this I am happy to change the Pull Request :)

https://bugs.python.org/issue35207

As commented initially in bpo-33878, the fact that expressions like
(x) = 42 are accepted is, in reality, an implementation detail and
they should be disallowed.
@pablogsal
Copy link
Member Author

pablogsal commented Nov 10, 2018

I am not sure what to do with the annotated assignment as in test_grammar there are these uses:

exec('X: int; Z: str = "Z"; (w): complex = 1j', ns)
def f2bad():
    (no_such_global): int
    print(no_such_global)

@gvanrossum
Copy link
Member

We should not do this. See the issue.

@gvanrossum gvanrossum closed this Nov 11, 2018
@pablogsal pablogsal deleted the bpo-35207 branch May 19, 2021 18:57
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