metaclasses -- aka Don Beaudry hook/hack (was RE: Why should i use python if i can use java)

James_Althoff at i2.com James_Althoff at i2.com
Mon Jun 11 20:20:56 EDT 2001


Skip Montanaro wrote:
>    James> I have found is that "the hook" doesn't seem to be complete in
>    James> the sense that only the "class" statement seems to know about
the
>    James> hook.
>
>Jim Fulton's ExtensionClass stuff knows about the Don Beaudry hook.
>ExtensionClasses are used in Zope (you can get the source from any Zope
>distribution) and by the latest Python wrappers for Gtk.
>
>--
>Skip Montanaro (skip at pobox.com)
>(847)971-7098

Thanks, Skip.

Before I head too deeply into Zope dependencies, I would be interested in
knowing whether or not "type(MyClass) == types.ClassType" and
"isinstance(myInstance,MyClass)" work for classes derived from
ExtensionClass.  (And if so, why do these work for C extension classes
using the Don Beaudry hook but not for Python classes using the same hook?)

Thanks,

Jim





More information about the Python-list mailing list