[Zope-dev] ExtensionClass question
Phillip J. Eby
pje@telecommunity.com
Thu, 24 Feb 2000 20:48:14 -0500
At 05:33 PM 2/24/00 -0800, Michel Pelletier wrote:
>
>So if I understand your original question right (which I may not), you
>want to use some sort of mechanism in C to generalize one ExtensionClass
>type with another *in C*. I don't think this is possible (it might be
>possible with some sort of C++ mechanism, but I haven't delved into that
>beast of a language in years...).
>
The method chain of an ExtensionClass type structure can point back to a
previous method chain, thus allowing extension of the type. Similarly, the
other members of the type structure can point to existing routines. And,
as long as one uses a backwardly compatible data structure for the type,
one can subclass an existing ExtensionClass. It is usually easier,
however, to just create mixin ExtensionClasses for the different bits you
need, and combine them together as base classes for a Python class.