149 :return: None
150 """
151 data = self._features_as_kv()
152 for key in data.keys():153 cache.batch_set(data[key])
154
155
Consider iterating the dictionary directly instead of calling .keys()
.
Using for key in dictionary
would always iterate the dictionary keys.
sounds = {"cow": "moo", "dog": "bark"}
for key in sounds.keys():
print(key)
sounds = {"cow": "moo", "dog": "bark"}
for key in sounds:
print(key)