Python Inheritance - A C example (without third party libraries)
Michael Hudson
mwh at python.net
Sat May 12 08:34:45 EDT 2001
"Aaron Drew" <nospam at nospam.com> writes:
> Can someone give me a source code example of how to derive a python
> class (written in C) from another python class (also written in C)
> such that I can:
>
> a. Derive further classes from it (in python)
> b. Determine if a derived class is a subclass of a particular base
> class (in C)
You should look at Jim Fulton's ExtensionClass, which I can't find a
URL for. Grr. It's part of zope, though, so that's one way of
getting it:
http://cvs.zope.org/Zope2/lib/Components/ExtensionClass/src/
Cheers,
M.
--
Worryingly, DEFUN appears to be a function that removes all the
fun from something: after using it all your code is converted
to C++. -- Tim Bradshaw, comp.lang.lisp
More information about the Python-list
mailing list