-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
bpo-39890: Don't mangle the AST when compiling starred assignments #18833
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -0,0 +1 @@ | |||
Don't mutate the AST when compiling starred assignments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an internal change without user impact so we don't need NEWS entry for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done! @pablogsal
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Thank you very much!
It looks like
assignment_helper
is the only place where we actually change the semantic meaning of the AST during compilation (a starred name is changed to a regular name as a shortcut).This probably isn't a great idea, and it would bite us later if we started making multiple passes or reusing the AST or something.
https://bugs.python.org/issue39890