[Zope3-checkins] CVS: ZODB4/ZODB - fsIndex.py:1.4
Jeremy Hylton
jeremy@zope.com
Wed, 31 Jul 2002 19:22:44 -0400
Update of /cvs-repository/ZODB4/ZODB
In directory cvs.zope.org:/tmp/cvs-serv3123
Modified Files:
fsIndex.py
Log Message:
Add __contains__()
=== ZODB4/ZODB/fsIndex.py 1.3 => 1.4 ===
v=self.get(key, self)
return v is not self
+ def __contains__(self, key):
+ tree = self._data.get(key[:6])
+ if tree is None:
+ return False
+ v = tree.get(key[6:], None)
+ if v is None:
+ return False
+ return True
+
def clear(self):
self._data.clear()