-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Description
diff --git a/redis/client.py b/redis/client.py
index 41a9660..bbec57a 100644
--- a/redis/client.py
+++ b/redis/client.py
@@ -578,18 +578,14 @@ class Redis(threading.local):
def mset(self, mapping):
"Sets each key in the ``mapping`` dict to its corresponding value"
- items = []
- [items.extend(pair) for pair in mapping.iteritems()]
- return self.execute_command('MSET', *items)
+ return self.execute_command('MSET', *mapping.items())
def msetnx(self, mapping):
"""
Sets each key in the ``mapping`` dict to its corresponding value if
none of the keys are already set
"""
- items = []
- [items.extend(pair) for pair in mapping.iteritems()]
- return self.execute_command('MSETNX', *items)
+ return self.execute_command('MSETNX', *mapping.items())
def move(self, name, db):
"Moves the key ``name`` to a different Redis database ``db``"
@@ -1132,9 +1128,7 @@ class Redis(threading.local):
Sets each key in the ``mapping`` dict to its corresponding value
in the hash ``name``
"""
- items = []
- [items.extend(pair) for pair in mapping.iteritems()]
- return self.execute_command('HMSET', name, *items)
+ return self.execute_command('HMSET', name, *mapping.items())
def hmget(self, name, keys):
"Returns a list of values ordered identically to ``keys``"
Metadata
Metadata
Assignees
Labels
No labels