标签: python-3.x redis
r = redis.StrictRedis(host=shard['host'], port=shard['port'], charset='utf-8', decode_responses=True) pipe = r.pipeline() for key in keys: pipe.lrange(key, 0, -1) olists = pipe.execute()
尽管设置了字符集和encode_responses = True,它仍获取字节对象而不是字符串。