Skip to content

bpo-32836: Remove temporary variable usage#5680

Merged
ncoghlan merged 3 commits into
python:masterfrom
nitishch:bpo-32836
Feb 26, 2018
Merged

bpo-32836: Remove temporary variable usage#5680
ncoghlan merged 3 commits into
python:masterfrom
nitishch:bpo-32836

Conversation

@nitishch
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

Does this need any tests?

@mjpieters
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown

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 <nitishchandrachinta@gmail.com>
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 <nitishchandrachinta@gmail.com>
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