Re: [Zope-dev] Adding a _frame argument to InterfaceClass.__init__ to make it subclassable
On 1 May 2011 01:06, Laurence Rowe wrote: > Hi, > > I'd like to apply the attached patch to zope.interface trunk to make > it more easily subclassable without having to copy and paste a chunk > of its __init__ into the subclass' __init__. On closer inspection, this doesn't seem to be necessary. With python 2.6 when creating a class __module__ is inserted as an attribute. Laurence ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Adding a _frame argument to InterfaceClass.__init__ to make it subclassable
On Sun, May 1, 2011 at 2:06 AM, Laurence Rowe wrote: > I'd like to apply the attached patch to zope.interface trunk to make > it more easily subclassable without having to copy and paste a chunk > of its __init__ into the subclass' __init__. The diff looks innocent enough to me. +1 on applying it Hanno ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Adding a _frame argument to InterfaceClass.__init__ to make it subclassable
Hi, I'd like to apply the attached patch to zope.interface trunk to make it more easily subclassable without having to copy and paste a chunk of its __init__ into the subclass' __init__. Motivating factor is: I need an Interface with a hook that gets called after InterfaceClass.__init__ to allow for: * Checking that field names supplied as tagged values from directives correspond to actual field names to detect typos. * Registering the Interface instance for further configuration to be executed by a zope.configuration action. (Subclass is http://dev.plone.org/plone/browser/plone.supermodel/branches/elro-directives/plone/supermodel/model.py#L52) Laurence InterfaceClass-frame.diff Description: Binary data ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )