[Grok-dev] Re: grok.Interface?
Martijn Faassen
faassen at startifact.com
Thu Jun 26 09:16:40 EDT 2008
Brandon Craig Rhodes wrote:
> Kevin Teague <kevin at bud.ca> writes:
>
>> Has making zope.interface.Interface available as grok.Interface been
>> considered?
[snip]
> But for things like "Interface" that are not directives but are simply
> normal objects of various sorts, we might not want to start down the
> path of providing them through "grok", since otherwise there's no end to
> the number of things it would have to include.
That's a reasonable rule, though I'd like to make an exception for
events. All rules like this tend to have their exceptions. :)
Events can come from every which place, and it'd nice to just be able to
say grok.IObjectModified and not having to worry anymore which
zope.whatever package that particular event came from. In fact, I'd like
to add the IBeforeTraverse event to the grok namespace too, as it's
quite frequently used.
> People so far, I note, have responded to you by talking about Interface
> as the target of adaptation; do Grok people ever creates Interfaces of
> their own and need "Interface" for that?
I'm not sure I understand the question, but I define interfaces as a
form of documentation in most of the (intended-to-be) reusable code I
write. Also of course whenever you need to define a schema you need to
use Interface.
Regards,
Martijn
More information about the Grok-dev
mailing list