Closed wrobell closed 5 years ago
I think the instances of for in list(some_dict.keys())
in the code were added by our use of the python 2to3 tool when porting from python2 to python3, I agree that for in some_dict
is much cleaner and works exactly the same.
This change looks good, I will merge.
dict.get
method with identity function as default converter instead oftry..except...
clause.for in some_dict
is the same asfor in list(some_dict.keys()
, but avoids creating the list._LiteralStructure
class equality operator overload.Above changes are compatible with both Python 2.7 and Python 3.