[Grok-dev] Re: directlyProvides

Philipp von Weitershausen philipp at weitershausen.de
Mon Mar 26 03:50:54 EDT 2007

Darryl Cousins wrote:
> Hi,
> I must be dense but I can't see how to use directlyProvides in grok. In
> doctest I would do:
> directlyProvides(IMyInterface, IContentType)

Note that directlyProvides() is a trap and should be avoided unless you 
really know what it's doing. Use alsoProvides() if you're unsure.

> and in zcml I would have done:
> <interface interface=".IMyInterface"
>            type="zope.app.content.IContentType" />
> And with grok I would use: ??

z.i.alsoProvides(iface, iiface)

http://worldcookery.com -- Professional Zope documentation and training

More information about the Grok-dev mailing list