summaryrefslogtreecommitdiff
path: root/redis/client.py
diff options
context:
space:
mode:
authorRoey Prat <roey.prat@redislabs.com>2018-10-28 09:51:55 +0200
committerRoey Prat <roey.prat@redislabs.com>2018-10-28 14:13:42 +0200
commit44942c7c5254bfaf2304299e82a49ef548bd31cb (patch)
treec75f98db23e2f19a10ffea9522ffab63b54c29ef /redis/client.py
parentabbd97050a7cb3e687c3ab23d6fc550e5f197b8d (diff)
downloadredis-py-44942c7c5254bfaf2304299e82a49ef548bd31cb.tar.gz
pieces.extend(pair) is slightly more efficient.
Diffstat (limited to 'redis/client.py')
-rwxr-xr-xredis/client.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/redis/client.py b/redis/client.py
index 842f5e9..78b8302 100755
--- a/redis/client.py
+++ b/redis/client.py
@@ -1773,8 +1773,7 @@ class StrictRedis(object):
if not isinstance(fields, dict) or len(fields) == 0:
raise RedisError('XADD fields must be a non-empty dict')
for pair in iteritems(fields):
- pieces.append(pair[0])
- pieces.append(pair[1])
+ pieces.extend(pair)
return self.execute_command('XADD', _name, *pieces)
def xrange(self, name, start='-', finish='+', count=None):