[Checkins] SVN: zope.app.keyreference/trunk/ performance fix for KeyReferenceToPersistent.

Gary Poster gary at modernsongs.com
Thu Aug 14 17:38:22 EDT 2008


On Aug 14, 2008, at 5:34 PM, Alexander J Smith wrote:

> Yes, it will.  Don't do that.

Heh.

Wichert, IMO this class is largely an implementation detail of the  
current ZODB conflict resolution code.  Subclassing it is, as I said  
to folks here, "inconceivable".

...Which, as a reference to _Princess Bride_, means *maybe* somebody  
did it, but in this case, they really, really shouldn't.

Gary

>
>
> Alexander J Smith
> Software Engineer
> Zope Corporation
>
> On Aug 14, 2008, at 5:31 PM, Wichert Akkerman wrote:
>
>> Previously Alex Smith wrote:
>>> Modified: zope.app.keyreference/trunk/src/zope/app/keyreference/
>>> persistent.py
>>> ===================================================================
>>> --- zope.app.keyreference/trunk/src/zope/app/keyreference/
>>> persistent.py	2008-08-14 20:18:50 UTC (rev 89843)
>>> +++ zope.app.keyreference/trunk/src/zope/app/keyreference/
>>> persistent.py	2008-08-14 21:28:39 UTC (rev 89844)
>>> @@ -61,7 +61,7 @@
>>>
>>>    def __cmp__(self, other):
>>>        if self.key_type_id == other.key_type_id:
>>> -            if isinstance(self.object, PersistentReference):
>>> +            if type(self.object) is PersistentReference:
>>>                # we are doing conflict resolution.
>>>                assert isinstance(other.object,
>>> PersistentReference), (
>>>                    'other object claims to be '
>>
>> Won't that break now if you have something uses a class derived from
>> PersistentReference ? Or is that something that can never happen?
>>
>> Wichert.
>>
>> -- 
>> Wichert Akkerman <wichert at wiggy.net>    It is simple to make things.
>> http://www.wiggy.net/                   It is hard to make things
>> simple.
>
> _______________________________________________
> Checkins mailing list
> Checkins at zope.org
> http://mail.zope.org/mailman/listinfo/checkins



More information about the Checkins mailing list