Skip to content

bpo-32836: Remove temporary variable usage #5680

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 3 commits into from
Feb 26, 2018
Merged

Conversation

nitishch
Copy link
Contributor

@nitishch nitishch commented Feb 14, 2018

Removed the symtable_new_tmpname method and also now unused ste_tmpname from PySTEntryObject.

https://bugs.python.org/issue32836

@nitishch
Copy link
Contributor Author

Does this need any tests?

@mjpieters
Copy link
Contributor

Not sure what you would test. There were no test for the temp variable in a symbol table to begin with (so a separate issue could be that we need some list / set / dict comprehension symbol table tests?)

@miss-islington
Copy link
Contributor

Thanks @nitishch for the PR, and @ncoghlan for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7.
🐍🍒⛏🤖

@ncoghlan
Copy link
Contributor

I marked this for 3.7 backport to keep the 3.8 & 3.7 symtable code in sync, but I don't think it's worth worrying about for 3.6 (since we're incredibly unlikely to make any further compiler changes on that branch).

@bedevere-bot
Copy link

GH-5913 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 26, 2018
When comprehensions switched to using a nested scope, the old
code for generating a temporary name to hold the accumulation
target became redundant, but was never actually removed.

Patch by Nitish Chandra.
(cherry picked from commit 3a087be)

Co-authored-by: Nitish Chandra <[email protected]>
miss-islington added a commit that referenced this pull request Mar 10, 2018
When comprehensions switched to using a nested scope, the old
code for generating a temporary name to hold the accumulation
target became redundant, but was never actually removed.

Patch by Nitish Chandra.
(cherry picked from commit 3a087be)

Co-authored-by: Nitish Chandra <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants