[Zope] Storing Persistent Objects as keys in BTrees
Thomas Guettler
zopestoller@thomas-guettler.de
Mon, 04 Feb 2002 17:55:56 +0100
Hi have problem that appears at random:
I store Persistent Objects (inherited from a Zope Folder) as keys in a
OOBTree.
I developed something like mxmRelation
(http://www.zope.org/Members/maxm/productList/mxmRelations)
It is strange: I get "r" from the keys of the hash, but if I try to get
it from the hash it fails.
This only happens sometimes.
def tostring(self):
"return string of the relations"
result={}
for r in self._tree.keys():
result[r]=[]
hash_back=self._tree.get(r, None)
if hash_back==None:
print "tostring(): ", r
raise Exception, "Internal Error ???"
return
for r2 in hash_back.keys():
result[r].append(r2)
return result
It is a single threaded application
I use the version for win32:
Zope 2.5.0 (binary release, python 2.1, win32-x86), python 2.1.2, win32