summaryrefslogtreecommitdiff
path: root/redis/client.py
diff options
context:
space:
mode:
Diffstat (limited to 'redis/client.py')
-rw-r--r--redis/client.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/redis/client.py b/redis/client.py
index 3e22615..0e3cac9 100644
--- a/redis/client.py
+++ b/redis/client.py
@@ -587,7 +587,8 @@ 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()]
+ for pair in mapping.iteritems():
+ items.extend(pair)
return self.execute_command('MSET', *items)
def msetnx(self, mapping):
@@ -596,7 +597,8 @@ class Redis(threading.local):
none of the keys are already set
"""
items = []
- [items.extend(pair) for pair in mapping.iteritems()]
+ for pair in mapping.iteritems():
+ items.extend(pair)
return self.execute_command('MSETNX', *items)
def move(self, name, db):
@@ -1144,7 +1146,8 @@ class Redis(threading.local):
in the hash ``name``
"""
items = []
- [items.extend(pair) for pair in mapping.iteritems()]
+ for pair in mapping.iteritems():
+ items.extend(pair)
return self.execute_command('HMSET', name, *items)
def hmget(self, name, keys):