Skip to content
Browse files

explained __contains__

  • Loading branch information...
1 parent c1ed1f0 commit 25cb43b8197918378cbd163579ff5a64b06e867f @atl atl committed May 27, 2010
Showing with 4 additions and 0 deletions.
  1. +4 −0 redish/proxy.py
View
4 redish/proxy.py
@@ -106,5 +106,9 @@ def __setitem__(self, key, value):
pline.execute()
def __contains__(self, key):
+ """
+ We check for existence within the *proxy object*, and so we
+ must look in both the backing store and the object's "empties."
+ """
return self.exists(key) or key in self.empties

0 comments on commit 25cb43b

Please sign in to comment.
Something went wrong with that request. Please try again.