[Zope3-Users] Interface confusion (still)

Benji York benji at zope.com
Tue Jul 15 18:56:51 EDT 2008


On Tue, Jul 15, 2008 at 6:31 PM, Tim Cook <timothywayne.cook at gmail.com> wrote:

>> Note: classes *implement* interfaces, their instances *provide* them.
>
> ... and I am still confused about a use case for classProvides.

When one says that a class *provides* an interface they're saying that
instances of that class *implements* the interface.

On the other hand, lets say you had an IFooFactory interface that only
required that objects *providing* it be callable.  In that case a class
Foo itself can *provide* the interface (because the class is callable).

Make sense?
-- 
Benji York
Senior Software Engineer
Zope Corporation


More information about the Zope3-users mailing list