2013-09-26 31 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

相關問題