Re: [PyKDE] segfault using hasattr on a wrappertype class

2005-10-19 Thread Phil Thompson
On Tuesday 18 October 2005 11:12 pm, Giovanni Bajo wrote: > Phil Thompson <[EMAIL PROTECTED]> wrote: > >> behaviour: > > import sip > > isinstance(sip.wrapper, object) > >> > >> True > >> > > issubclass(sip.wrapper, object) > >> > >> True > >> > >> Dunno if it's related to the fix. > >

Re: [PyKDE] segfault using hasattr on a wrappertype class

2005-10-18 Thread Giovanni Bajo
Phil Thompson <[EMAIL PROTECTED]> 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 su

Re: [PyKDE] segfault using hasattr on a wrappertype class

2005-10-18 Thread Phil Thompson
On Tuesday 18 October 2005 9:13 pm, Giovanni Bajo wrote: > Phil Thompson <[EMAIL PROTECTED]> 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 > > ex

Re: [PyKDE] segfault using hasattr on a wrappertype class

2005-10-18 Thread Giovanni Bajo
Phil Thompson <[EMAIL PROTECTED]> 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 s

Re: [PyKDE] segfault using hasattr on a wrappertype class

2005-10-13 Thread Phil Thompson
On Thursday 13 October 2005 1:45 pm, Giovanni Bajo wrote: > Hello, > > this snippet causes a segfault on my computer (using Python 2.4.2): > >>> import sip > >>> sip.SIP_VERSION_STR > > '4.3.1' > > >>> class Foo(object): > > ... __metaclass__ = sip.wrappertype > ... > > >>> hasattr(Foo, "bar")

[PyKDE] segfault using hasattr on a wrappertype class

2005-10-13 Thread Giovanni Bajo
Hello, this snippet causes a segfault on my computer (using Python 2.4.2): >>> import sip >>> sip.SIP_VERSION_STR '4.3.1' >>> class Foo(object): ... __metaclass__ = sip.wrappertype ... >>> hasattr(Foo, "bar") Segmentation fault -- Giovanni Bajo _