Re: [Zope-dev] ExtensionClass question
On Thu, 24 Feb 2000, Phillip J. Eby wrote:
At 05:33 PM 2/24/00 -0800, Michel Pelletier wrote: 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.
I had read the stuff about method chains, but just using method chains does not store any relationship between the two classes. If possible, I would like to be able to use subclass relationships for a bit of type safety in my code (ie. only accept ExtensionClasses of type xxx or its subclasses rather than accept any ExtensionClass). It must be possible to do something like this, as subclassing an ExtensionClass in python creates a new ExtensionClass. Doing the same in C must also be possible (although maybe not with ExtensionClass's current public API). James.
participants (1)
-
James Henstridge