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

Alexander J Smith alex at zope.com
Thu Aug 14 17:34:48 EDT 2008


Yes, it will.  Don't do that.

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.



More information about the Checkins mailing list