Closed takluyver closed 9 years ago
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().
for x in d.values()
Coverage increased (+0.02%) to 95.64% when pulling 8a1ef249bf6b75393df60cfcf9615eca915f592e on takluyver:dict-methods-in-loops into 5ab6f019cc91e1269a403a15a12709400e4941b1 on python-modernize:master.
thanks! I'll try it out and see if it solves my problem.
LGTM.
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()
.