Meta-class inheritance problem (Python2.0 bug?)
Lorien Dunn
loriendNOSPAM at bigpond.com
Sat Mar 17 21:04:03 EST 2001
Gordon McMillan wrote:
>
> That's the same code as Python 1.5. Did this work before?
I don't know. I don't have python 1.5 anymore, and its a new extension I'm
writing. David Abrahams (the major author of the boost::python lib) said
that isinstance() and issubclass() have been fixed to deal with metaclasses
in Python 2.0, but it seems this check of self hasn't.
>
> From your previous post, it does not appear to be using the Don Beaudry
> hook, but then again, I don't know what type(MyBoostClass) is.
A boost class is a class that uses the boost::python library to reflect a
C++ class in python. It does use the Don Beaudry hook. IMHO Boost seems to
be the only reasonable way to wrap C++ (and I've tried SWIG, Siloon, SIP,
CXX, and Boost), in that it supports exceptions, overidable virtual
functions, derivation from C++ classes without shadow classes, automatic
type conversion, function overloading, etc. It is also MUCH easier to use
than Zope. However it puts a lot of stress on the compiler in terms of
adherance to the ansi standard. And a lot of stress on the system. The
wrapping code of my extension takes about 10 minutes 160 megs of ram to
compile (and its not that large).
Boost as a whole is a C++ library that seems to be almost a draft for the
next ansi standard. If you use C++ it will make your life more pleasant.
Have a look at http://www.boost.org.
Thanks,
Lorien Dunn
More information about the Python-list
mailing list