diff options
| author | Andy McCurdy <andy@andymccurdy.com> | 2011-03-16 10:27:38 -0700 |
|---|---|---|
| committer | Andy McCurdy <andy@andymccurdy.com> | 2011-03-16 10:27:38 -0700 |
| commit | fe18db0fc0fd0112d7bb2071c3760799b3ac739b (patch) | |
| tree | bcee4b077588eb77dd736764acd981692ad91d6e | |
| parent | 52098ce02c926115c937c1731ac029c269289c7b (diff) | |
| download | redis-py-fe18db0fc0fd0112d7bb2071c3760799b3ac739b.tar.gz | |
slight performance tweak to zset_score_pairs. Thanks Suor
| -rw-r--r-- | redis/client.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/redis/client.py b/redis/client.py index cc649db..bddb8c8 100644 --- a/redis/client.py +++ b/redis/client.py @@ -93,8 +93,8 @@ def zset_score_pairs(response, **options): """ if not response or not options['withscores']: return response - return list(izip(islice(response, None, None, 2), - imap(float, islice(response, 1, None, 2)))) + it = iter(response) + return zip(it, imap(float, it)) def int_or_none(response): if response is None: |
