I'm looking at an output from 2to3 that includes this change:
- for file_prefix in output.keys():
+ for file_prefix in list(output.keys()):
where output
is a dictionary.
What is the significance of this change? Why does 2to3 do this?
How does this change make the code Python 3 compatible?
d.keys()[0]
on python 2 and then on python 3 – Vicariousfor file_prefix in output:
, but py2to3 cannot guess that. – Wilder