[Grok-dev] Re: grok.Interface?

Martijn Faassen faassen at startifact.com
Thu Jun 26 07:38:17 EDT 2008


Jan-Wijbrand Kolman wrote:
> Kevin Teague wrote:
>> Has making zope.interface.Interface available as grok.Interface been
>> considered?
> snip
>> But I like the idea of doing fewer imports for very commonly used 
>> stuff :)
> 
> Personally I would be against this. I generally do not even use:
> 
>   ...
>   grok.implements(IWhatever)
>   ...
> 
> but use:
> 
>   from zope import interface
>   ...
>   interface.implements(IWhatever)
>   ...
> 
> since it makes learning about what *Zope* *is* and what it provides easier.

Well, it's a balance between convenience and separation of concerns. 
There's a bit of a sliding scale here - if we have grok.Interface, what 
about schemas? grok.Text? Yes, no?

While of course interfaces are a pretty central concept in Zope, I'm not 
sure whether a separate importing of zope.interface makes learning what 
Zope is that much easier, myself. Certainly in your case it won't help 
*you* any to do what you do, as you already know where implements comes 
from yourself. :)

Regards,

Martijn



More information about the Grok-dev mailing list