我想请教一下 python 操作 redis 使用 redis.StrictRedis 创建的 redis 对象 使用 redis.zrangebyscore 能够指定获取多少条数据吗,我没发现有 limit 这个参数 但是直接操作 redis 的话是可以的 如果可以指定获取的数目的话 要怎么操作呢 (已传入最大最小值)
我想请教一下 python 操作 redis 使用 redis.StrictRedis 创建的 redis 对象 使用 redis.zrangebyscore 能够指定获取多少条数据吗,我没发现有 limit 这个参数 但是直接操作 redis 的话是可以的 如果可以指定获取的数目的话 要怎么操作呢 (已传入最大最小值)
1
atx Oct 28, 2018
https://redis-py.readthedocs.io/en/latest/#redis.StrictRedis.zrangebyscore
zrangebyscore(name, min, max, start=None, num=None, withscores=False, score_cast_func=<type 'float'>) `If start and num are specified, then return a slice of the range.` 试试这个 |