Closed AlexRBaker closed 9 years ago
Hi,
Apologies for letting this sit so long. A question though, perhaps naive. What is the idea behind adding list
in the for loops, e.g.
- for cid in contigs.keys():
+ for cid in list(contigs.keys()):
I don't imagine there is any difference in terms of it working on not, I'm just curious.
There was a change in dicts.keys(), dict.values() and dict.items() between python 2 and 3. In python 2 these return lists while in python 3 they return dynamic views. Hence, in 2to3.py they erred on the side of caution and change all calls of dicts.keys() etc into lists as they would have been in python 2. I haven't looked through these automatic changes for unnecessary ones so it is still there.
The modernize wrapper for 2to3 was used to try and port bamM to python3. Some type issues introduced by the port were fixed but an issue of byte literals versus unicode literals was not resolved.