Skip to content

Commit

Permalink
-Add CHANGES message.
Browse files Browse the repository at this point in the history
-Rename variables for coherence
  • Loading branch information
Christian Bodt committed Oct 20, 2015
1 parent c1a5344 commit 18893f7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
get stuck in an endless loop if a specific number of bytes were
delivered from the socket. This fix also increases performance of
parsing large responses from the Redis server.
* Added support for ZREVRANGEBYLEX.
* 2.10.3
* Fixed a bug with the bytearray support introduced in 2.10.2. Thanks
Josh Owen.
Expand Down
6 changes: 3 additions & 3 deletions redis/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1661,18 +1661,18 @@ def zrangebylex(self, name, min, max, start=None, num=None):
pieces.extend([Token('LIMIT'), start, num])
return self.execute_command(*pieces)

def zrevrangebylex(self, name, upper, lower, start=None, num=None):
def zrevrangebylex(self, name, max, min, start=None, num=None):
"""
Return the reversed lexicographical range of values from sorted set
``name`` between ``upper`` and ``lower``.
``name`` between ``max`` and ``min``.
If ``start`` and ``num`` are specified, then return a slice of the
range.
"""
if (start is not None and num is None) or \
(num is not None and start is None):
raise RedisError("``start`` and ``num`` must both be specified")
pieces = ['ZREVRANGEBYLEX', name, upper, lower]
pieces = ['ZREVRANGEBYLEX', name, max, min]
if start is not None and num is not None:
pieces.extend([Token('LIMIT'), start, num])
return self.execute_command(*pieces)
Expand Down

0 comments on commit 18893f7

Please sign in to comment.