[Zope-dev] Subclassing ExtensionClasses in C?

James Henstridge james@daa.com.au
Sun, 20 Feb 2000 21:31:32 +0800 (WST)


This question is not directly related to zope, but I was told on
comp.lang.python that this would be a better place to ask.  The question
is about the ExtensionClass package that now seems to be maintained as
part of zope.  I guess the problem might be encountered by some people
writing zope packages, so it is sort of zope related :)

I am looking at converting my pygtk wrapper for GTK+ over to using
ExtensionClass (because it will reduce the amount of code needed, and make
it easier to autogenerate the wrapper, among other reasons).

This would involve creating a fairly deep heirachy of classes defined in
C.  While looking through the ExtensionClass documentation, there were
examples of creating ExtensionClasses and subclassing extension classes
from python, but no examples of subclassing from C.  Is this actually
possible to do with ExtensionClass?

I noticed it is possible to create a PyMethodChain for each class, which
would allow inheritance of methods, but does not handle `instance of' type
relationships, which I need to do some type checking.

I hope someone knows the answer to this.

Thanks,

James Henstridge.

--
Email: james@daa.com.au
WWW:   http://www.daa.com.au/~james/