2013-09-26 30 views

回答

80

This seems pretty clear

redis-py exposes two client classes that implement these commands 
The StrictRedis class attempts to adhere to the official command syntax. 

In addition to the changes above, the Redis class, a subclass of StrictRedis, 
overrides several other commands to provide backwards compatibility with older 
versions of redis-py 

你需要向后兼容?使用Redis。不关心?使用StrictRedis


2017年3月31日

下面是向后兼容的细节,从github.com链路专利:

除了上述变动,Redis的类, StrictRedis的一个子类,覆盖了其他几个命令,以提供与老版本的redis-py向后兼容:

LREM:'num'和'value'参数的顺序颠倒过来,'num'可以提供一个defa超零值。

ZADD:Redis指定'value'之前的'score'参数。这些在实施时意外交换,直到人们已经使用它们之后才被发现。 Redis类预计*参数的形式为:name1,score1,name2,score2,...

SETEX:颠倒了'time'和'value'参数的顺序。


+0

噢噢噢!我还没有仔细阅读这些lines.Thank你@hughdbron –

+0

@AliBagheriShakib究竟是这种落后了兼容性? – Luv33preet

相关问题