[Grok-dev] grok.Interface?
Brandon Craig Rhodes
brandon at rhodesmill.org
Thu Jun 26 07:49:36 EDT 2008
Kevin Teague <kevin at bud.ca> writes:
> Has making zope.interface.Interface available as grok.Interface been
> considered?
I like pulling Grok classes from "grok" and pre-existing Zope 3 classes
from whatever their home is in the Zope namespace. Currently, our loose
rule seems to be that declarations should all come from "grok", no
matter where they come from in Zope, so that:
class MyAdapter(grok.Adapter):
grok.implements(IMammoth)
grok.context(ISloth)
... looks symmetrical; it would really lose something, visually, if all
of those pretty "grok." strings lined up down the left-hand side became:
class MyAdapter(grok.Adapter):
zope.interface.implements(IMammoth)
grok.context(ISloth)
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.
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?
--
Brandon Craig Rhodes brandon at rhodesmill.org http://rhodesmill.org/brandon
More information about the Grok-dev
mailing list