Return value of delete() is wrong
j-schulz opened this issue · 0 comments
j-schulz commented
Example:
import memcache
m = memcache.Client(["127.0.0.1:11211"])
m.set("foo", "bar")
print(m.delete("foo"))
print(m.delete("foo"))
Output:
1
1
telnet localhost 11211
set foo 0 0 3 data
bar
STORED
delete foo
DELETED
delete foo
NOT_FOUND
So returning 1 if the key does not exist is wrong. I expect 0 or False or None, but not 1.