[Zope-dev] ExtensionClass question
Michel Pelletier
michel@digicool.com
Thu, 24 Feb 2000 18:11:30 -0800
"Phillip J. Eby" wrote:
>
> 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.
Ah!
> 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.
I see, it's one of those using-C-in-an-OO-way kind of things without
there being an explicit language mechanism to get it done.
> 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.
Understood.
-Michel