You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importfakeredisr=fakeredis.FakeStrictRedis()
r['foo'] ='bar'print (r['foo']) #bardelr['foo'] #AttributeError: __delitem__#r.delete('foo') #this would work
My guess on this is that even if __delitem__ is there in _StrKeyDict, because of name mangling, this happens.
If there's interest in getting this fixed, I can probably do a clean enough PR.
The text was updated successfully, but these errors were encountered:
Noticed fakeredis does not support "del" operator, i.e. it does not implement
__delitem__
, while real redis does.So code like this works on real redis:
but fails on fakeredis:
My guess on this is that even if
__delitem__
is there in _StrKeyDict, because of name mangling, this happens.If there's interest in getting this fixed, I can probably do a clean enough PR.
The text was updated successfully, but these errors were encountered: