[PyKDE] segfault using hasattr on a wrappertype class
phil at riverbankcomputing.co.uk
Thu Oct 13 18:00:48 BST 2005
On Thursday 13 October 2005 1:45 pm, Giovanni Bajo wrote:
> this snippet causes a segfault on my computer (using Python 2.4.2):
> >>> import sip
> >>> sip.SIP_VERSION_STR
> >>> class Foo(object):
> ... __metaclass__ = sip.wrappertype
> >>> hasattr(Foo, "bar")
> Segmentation fault
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.
More information about the PyQt