mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
Changed the example to show how to create types the new way: - Use a class new method rather than a new function. - Use self->ob_type->tp_free in deallocators - Use attribute descriptors rather than set/getattr methods. - Make the type usable as a base type. I split the example into 3 parts: 1. The minimal new type 2. Adding attributes and methods. 3. Finer control over attributes. It's much simpler to define builtin types. These updates hopefully show this. I also made minor wording changes in two other places. I still need to update xxobject.c |
||
|---|---|---|
| .. | ||
| .cvsignore | ||
| building.tex | ||
| cycle-gc.c | ||
| embedding.tex | ||
| ext.tex | ||
| extending.tex | ||
| newtypes.tex | ||
| noddy.c | ||
| noddy2.c | ||
| noddy3.c | ||
| run-func.c | ||
| windows.tex | ||