Boost logo

Boost :

From: Ivan A. Vigasin (vig_at_[hidden])
Date: 2001-11-13 08:36:29

Hello, All

I have problem with mixing extension classes with python classes.

$ python
Traceback (most recent call last):
  File "", line 12, in ?
    File "", line 10, in __init__
  TypeError: unbound method __init__() must be called with instance as first argument

Where is:

class A:
  def __init__(self):

from extmodule import ExtClass

class B(A,ExtClass):
  def __init__(self):


In C++:
 python::class_builder<ExtClass> connect_class(this_module, "ExtClass" );
 connect_class.def( python::constructor<>() );

All OK when using single inheritance or multiple with both extension classes.

Regards, Ivan <vig_at_[hidden]>
ICQ: 22181170

Boost list run by bdawes at, gregod at, cpdaniel at, john at