Pyste was generating constructors defs for abstract classes. I've changed Pyste so that it will insert no_init (and emit no constructors) for abstract classes. Is this the correct behaviour for an abstract class? eg. class_< Foo, boost::noncopyable>("Foo", no_init) This from the FAQ states this quite clearly: http://www.python.org/cgi-bin/moinmoin/boost_2epython_2fFAQ
* no_init means "do not try to create an instance of that Python object, create __init__ function that throws an exception" * noncopyable means "do not try to register a converter which can convert C++ return values of that class to Python".
When wrapping an abstract class, it's necessary to specify both.
However, what's confusing me is that I thought specifying no_init would make the following incorrect: class Bar(CppModule.Foo): def __init__(self): CppModule.Foo.__init__(self) Is that correct?
participants (1)
-
paul.bridger