[PyKDE] segfault using hasattr on a wrappertype class

Phil Thompson phil at riverbankcomputing.co.uk
Tue Oct 18 22:09:55 BST 2005


On Tuesday 18 October 2005 9:13 pm, Giovanni Bajo wrote:
> Phil Thompson <phil at riverbankcomputing.co.uk> wrote:
> > It will be fixed in tonight's snapshot.
> >
> > It will now raise an exception saying that Foo should be derived from
> > sip.wrapper. If you change it so it is, hasattr() returns False as
>
> expected.
>
>
> I have not tried that snapshot yet. Anyway, I noticed this strange
>
> 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?

Phil




More information about the PyQt mailing list