[C++-sig] C++ derived from bp::dict
Stefan Seefeld
seefeld at sympatico.ca
Thu Feb 10 21:30:23 CET 2011
Hi Michael,
I strongly doubt that what you want is possible.
While class_<A> generates a Python type that wraps 'A',
boost::python::dict itself is not built that way. Rather, it is a proxy
to a Python dict object. Types defined via "class_<>" are added to a
type registrar, which is inspected whenever a C++<->Python conversion is
requested. I strongly doubt that the boost::python::object derivatives
are themselves registered there.
Besides, Python has strong requirements concerning what types are
allowed to derive from what base types (as far as the associated
meta-classes are concerned), which I don't think are met by the above.
Stefan
--
...ich hab' noch einen Koffer in Berlin...
More information about the Cplusplus-sig
mailing list