[PyKDE] segfault using hasattr on a wrappertype class

Giovanni Bajo rasky at develer.com
Tue Oct 18 23:12:01 BST 2005


Phil Thompson <phil at riverbankcomputing.co.uk> wrote:

>> behaviour:
>>>>> import sip
>>>>> isinstance(sip.wrapper, object)
>>
>> True
>>
>>>>> issubclass(sip.wrapper, object)
>>
>> True
>>
>> Dunno if it's related to the fix.
>
> Why is it strange?

It's uncommon for an object to both be an instance *and* a subclass of a
given class. What other object in Python has the same property?
-- 
Giovanni Bajo




More information about the PyQt mailing list