[Zope-dev] Metaclass resolution for InterfaceClass

Laurence Rowe l at lrowe.co.uk
Sun May 1 15:28:58 EDT 2011


While experimenting with my InterfaceClass subclass I noticed that it
was only being used when it was specified as the first of the bases. I
believe this is because InterfaceClass is not a subclass of ``type``,
so the normal metaclass derivation logic is not applied. The attached
patch implements that logic in InterfaceClass.__new__, picking from
the base metaclasses that metaclass which subclasses all other base
metaclasses.

Laurence
-------------- next part --------------
A non-text attachment was scrubbed...
Name: metaclass_resolution.diff
Type: application/octet-stream
Size: 2203 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope-dev/attachments/20110501/0fabb0b4/attachment.obj 


More information about the Zope-Dev mailing list