Implementing Metatypes in C

Greg Chapman glc at well.com
Tue Apr 15 10:02:21 EDT 2003


On Tue, 15 Apr 2003 13:34:47 GMT, Greg Chapman <glc at well.com> wrote:

>I believe your solution may break in 2.3a2 if subtypes declare tp_members, since
>the PyMemberDefs for these are kept in the variable part of the type structure
>which follows the things declared in etype

Actually, that's bogus.  It's not tp_members which get stored in the etype's
members, but the PyMemberDefs for __slots__.  Nevertheless, without the patch,
you can run into problems trying to extend the etype structure in a metatype.

---
Greg Chapman





More information about the Python-list mailing list