[C++-sig] boost.python metaclass problem
Tim Blechmann
tim at klingt.org
Fri Mar 2 00:54:34 CET 2007
hi stefan ...
> > now, when deriving my class from these two classes, i'm getting the
> > message:
> > TypeError: Error when calling the metaclass bases metaclass conflict:
> > the metaclass of a derived class must be a (non-strict) subclass of the
> > metaclasses of all its bases
> >
> > any idea, how to solve the metaclass conflict? my boost.python class has
> > the structure:
> > class_<my_wrapper, boost::noncopyable>("my_class")
> > .def("my_fun", &my_wrapper::my_fun);
>
> The problem you are facing is that there are certain constraints on
> the metaclasses of your (multiple) base classes:
>
> http://www.python.org/download/releases/2.2/descrintro/#metaclasses
>
> I don't know pyqt, and I'm not sure you get access to boost.python's
> own metaclass. (David ?) You may need to derive a new metaclass from
> boost.python's one as well as the pyqt metaclass.
i see ... in the meanwhile i've been trying to use the metaclass
conflict resolver found at
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/204197.
however with the result of giving me a
TypeError: multiple bases have instance lay-out conflict
i would prefer to find a clean solution for this, avoiding the multiple
inheritance would add an additional indirection in my code, that i'd
like to avoid ...
thanks ... tim
--
tim at klingt.org ICQ: 96771783
http://tim.klingt.org
Your mind will answer most questions if you learn to relax and wait
for the answer.
William S. Burroughs
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20070302/c00ac336/attachment.pgp>
More information about the Cplusplus-sig
mailing list