[Python-Dev] Feature request: better support for "wrapper" objects
Thomas Heller
thomas.heller@ion-tof.com
Fri, 11 Jan 2002 17:40:46 +0100
From: "Jack Jansen" <jack@oratrix.nl>
>
> Recently, "Thomas Heller" <thomas.heller@ion-tof.com> said:
> > Here's an outline which could work in 2.2:
>
> This sounds very good! There's only one thing you'll have to explain
> to me: how would this work from C? My types are all in C, not in
> Python, so I'd need to do the magic in C. Where do I find examples of
> using metatypes from C?
>
I don't know of any, well, except ceval.c build_class():
result = PyObject_CallFunction(metaclass, "OOO", name, bases, methods);
I had no need for this, because I'm very happy to write base classes/types
in C, extend them by deriving subtypes from them in Python, and plugging
everything together in Python.
Thomas