[Python-Dev] Extending types in C (original) (raw)

[Python-Dev] Extending types in C - help needed

Guido van Rossum guido@python.org
Sat, 19 Jan 2002 19:53:41 -0500


> Yes, alas. The type you would have to declare is 'etype', a private > type in typeobject.c.

Does this mean this is the wrong route, or is it absolute impossible to create a subtype of PyTypeType in C with additional slots?

I wish I had time to explain this, but I don't. For now, you'll have to read how types are initialized in typeobject.c -- maybe there's a way, maybe there isn't.

Any tips about the route to take?

It can be done easily dynamically.

--Guido van Rossum (home page: http://www.python.org/~guido/)