[Doc-SIG] A draft for a "defining new types" chapter for ext.tex

Michael Hudson mwh21@cam.ac.uk
Mon, 19 Feb 2001 13:05:45 +0000 (GMT)


After various people noticing that there is no documentation at all for
defining new types for python in the standard docs I set to work:

http://www-jcsu.jesus.cam.ac.uk/~mwh21/hacks/ext/defining-new-types.html

It's not even nearly finished; I would like to add sections on supporting
GC, coercion, rich comparisons &c (partly because documenting such things
would force me to learn about them!).  But I would like to see what people
think.

It strikes me that

(a) to define a new type really you need to understand how Python is
    implemented.  So perhaps I should write a Python-Internals-HOWTO
    first.
(b) The Extending and Embedding Manual could really do with being entirely
    rewritten.
(c) It's hard to think of a sensible order to write such a thing in
    without lots of circular dependencies (of the form you need to read
    chapter I to understand chapter II, but to understand chapter I you
    need to have read chapter III which requires understanding chapter
    II...).

Anybody got some spare-time-in-a-tin?

Cheers,
M.