Skip to content

Commit

Permalink
Avoid needlessly making temporary lists to merge dict(s) together
Browse files Browse the repository at this point in the history
  • Loading branch information
harlowja committed Sep 28, 2015
1 parent 03ac9e2 commit 327c7e6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion redis/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ def string_keys_to_dict(key_string, callback):

def dict_merge(*dicts):
merged = {}
[merged.update(d) for d in dicts]
for d in dicts:
merged.update(d)
return merged


Expand Down

0 comments on commit 327c7e6

Please sign in to comment.