On 26 Jun 2006, at 21:28, Robert Gravina wrote:
def __eq__(self, other):
if isinstance(other, ):
if hasattr(other,"_p_oid") and other._p_oid != None
and (other._p_oid == self._p_oid):
return True
else:
return False
and now ca
def __eq__(self, other):
if isinstance(other, ):
if hasattr(other,"_p_oid") and other._p_oid != None
and (other._p_oid == self._p_oid):
return True
else:
return False
and now can compare objects for equality after the (Twisted
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Robert Gravina wrote:
>
> On 2006/06/27, at 3:49, Benji York wrote:
>
>> Robert Gravina wrote:
>>> I just tried loading a persisted object interactively and noticed
>>> that although the _p_oid doesn't print out as anything (and hence I
>>> always
On Jun 26, 2006, at 3:16 PM, Florent Guillaume wrote:
On 26 Jun 2006, at 21:11, Robert Gravina wrote:
On 2006/06/27, at 3:49, Benji York wrote:
Robert Gravina wrote:
I just tried loading a persisted object interactively and
noticed that although the _p_oid doesn't print out as anything
On Jun 26, 2006, at 3:11 PM, Robert Gravina wrote:
I seemed to have solved this problem. I was able to write a __eq__
function like this:
def __eq__(self, other):
if isinstance(other, ):
if hasattr(other,"_p_oid") and other._p_oid != None and
(other._p_oid == self._
On 26 Jun 2006, at 21:11, Robert Gravina wrote:
On 2006/06/27, at 3:49, Benji York wrote:
Robert Gravina wrote:
I just tried loading a persisted object interactively and
noticed that although the _p_oid doesn't print out as anything
(and hence I always thought it was empty in my debugging
On 2006/06/27, at 3:49, Benji York wrote:
Robert Gravina wrote:
I just tried loading a persisted object interactively and noticed
that although the _p_oid doesn't print out as anything (and hence
I always thought it was empty in my debugging prints), it isn't
actually None! Can anyone
Robert Gravina wrote:
I just tried loading a persisted
object interactively and noticed that although the _p_oid doesn't
print out as anything (and hence I always thought it was empty in my
debugging prints), it isn't actually None! Can anyone explain this?
(here "p" is my persisted object
On 2006/06/27, at 3:16, Florent Guillaume wrote:
Robert Gravina wrote:
I've been having trouble getting the object ID of persisted
objects in the ZODB. I have read that the _p_oid attribute is
supposed to contain this, but when I access persisted objects from
a filestore and check this va
Robert Gravina wrote:
I've been having trouble getting the object ID of persisted objects in
the ZODB. I have read that the _p_oid attribute is supposed to contain
this, but when I access persisted objects from a filestore and check
this value it always seems to be None.
Also, is there any wa
10 matches
Mail list logo