diff options
Diffstat (limited to 'redis/commands/core.py')
-rw-r--r-- | redis/commands/core.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/redis/commands/core.py b/redis/commands/core.py index 90997ff..67f1bfa 100644 --- a/redis/commands/core.py +++ b/redis/commands/core.py @@ -2520,6 +2520,13 @@ class CoreCommands: ``offset`` and ``num`` are specified, then return a slice of the range. Can't be provided when using ``bylex``. """ + # Need to support ``desc`` also when using old redis version + # because it was supported in 3.5.3 (of redis-py) + if not byscore and not bylex and (offset is None and num is None) \ + and desc: + return self.zrevrange(name, start, end, withscores, + score_cast_func) + return self._zrange('ZRANGE', None, name, start, end, desc, byscore, bylex, withscores, score_cast_func, offset, num) |