FEEDBACK WANTED: Type/class unification
Guido van Rossum
guido at python.org
Wed Aug 22 04:45:49 EDT 2001
Paul Moore <paul.moore at uk.origin-it.com> writes:
> On Mon, 20 Aug 2001 11:00:37 +0200, Paul Moore <paul.moore at uk.origin-it.com>
> wrote:
>
> >So I looked through PEP 252 looking for a simple summary of how to add
> >"subclassability" to an existing C type. I could find nothing.
>
> Doh. If I'd looked in PEP 253, I'd have seen it. Looks fairly messy,
> though...
That's C extensions for ya...
> Maybe a simple example would help. (I assume a simple example is possible -
> otherwise, I don't imagine that many 3rd party extension types will end up
> supporting this...)
The simplest example at the moment is probably the list type...
I'll try to add a working example to Modules/xxsubtype.c (which
already shows how to subclass in C, but not really what to do to
create a subclassable type).
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-list
mailing list