Remove dictionary keys
Sourcery refactoring id:
Removes unnecessary call to
keys() when iterating over a dictionary
for currency in currencies.keys(): process(currency)
for currency in currencies: process(currency)
Sometimes when iterating over a dictionary you only need to use the dictionary keys.
In this case the call to
keys() is unnecessary, since the default behaviour when
iterating over a dictionary is to iterate over the keys.
The code is now slightly cleaner and easier to read, and avoiding a function call will yield a (small) performance improvement.