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

Fix transformation of non-iter dict methods in for loops #120

Merged
merged 1 commit into from
Mar 21, 2015

Conversation

takluyver
Copy link
Contributor

Addresses issue #119 - it's not exactly what the author asked for, but I think it's better ;-)

For some reason, 2to3 only treats a for loop as a special context for iter* methods, so it will add a list() call to e.g. for x in d.values().

Addresses issue #119 - it's not exactly what the author asked for, but I
think it's better ;-)

For some reason, 2to3 only treats a for loop as a special context for
iter* methods, so it will add a list() call to e.g. `for x in
d.values()`.
@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 95.64% when pulling 8a1ef24 on takluyver:dict-methods-in-loops into 5ab6f01 on python-modernize:master.

@rsyring
Copy link

rsyring commented Mar 20, 2015

thanks! I'll try it out and see if it solves my problem.

@daira
Copy link
Contributor

daira commented Mar 21, 2015

LGTM.

daira added a commit that referenced this pull request Mar 21, 2015
Fix transformation of non-iter dict methods in for loops
@daira daira merged commit c350457 into PyCQA:master Mar 21, 2015
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.

None yet

4 participants