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

Michael Hudson mwh21@cam.ac.uk
Mon, 19 Feb 2001 14:21:56 +0000 (GMT)


On Mon, 19 Feb 2001, Fred L. Drake, Jr. wrote:

> 
> Michael Hudson writes:
>  > 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
> 
>   I'll take a look at this; hopefully later today.  Do I have
> permission to integrate this into the existing documentation?

By all means; I was going to submit it as a patch when I'd got some more
done.  But if you like what's there, go for it.  

I would probably be easier if I sent you the Tex, too...

>  > 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.
> 
>   I have some text from Neil Schemenauer on adding GC support to
> objects; I'll try and integrate that before the upcoming beta.

That'd be cool.

>  > (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.
> 
>   That might even reasonably be part of the Extending & Embedding
> manual, given the necessity of understanding the material.  If you
> write it, it's pretty much your call where it goes.

OK.  I'll see what I come up with, and when.

>  > (b) The Extending and Embedding Manual could really do with being entirely
>  >     rewritten.
> 
>   Yep!

I even thought about replying to one of those "write a book about Python
for us" posts on clpy with the suggestion of a Python internals book, but
then I thought I'd better worry about passing this year...

>  > (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...).
> 
>   Sure!  It'll open when my kids are on there own, so it will be a
> while before it's available.  ;-)

Don't have that time-sink yet...

Cheers,
M.