[Grok-dev] grok.Interface?

Kevin Teague kevin at bud.ca
Wed Jun 25 19:55:36 EDT 2008


Has making zope.interface.Interface available as grok.Interface been
considered?

I sure do import the zope.interface package a lot, and most of the time it's
so that I can declare a new Interface. And most of the time I've already
imported the grok package. This could change code from this:

  import grok
  from zope import interface

  class IHome(interface.Interface): pass  
  class Cave(grok.Model): pass
    grok.implements(IHome)

Into this:

  import grok

  class IHome(grok.Interface): pass  
  class Cave(grok.Model): pass
    grok.implements(IHome)

I guess this breaks the grok.Capname convention of providing base classes
for components, since grok.Interface doesn't need to be grokked, isn't a
component, etc. And maybe there are other reasons that this is silly idea?

But I like the idea of doing fewer imports for very commonly used stuff :)


-- 
View this message in context: http://www.nabble.com/grok.Interface--tp18124029p18124029.html
Sent from the Grok mailing list archive at Nabble.com.



More information about the Grok-dev mailing list