[Zope3-Users] classProvides and inheritance

Jim Fulton jim at zope.com
Sat Aug 15 16:57:49 EDT 2009

On Sat, Aug 15, 2009 at 4:49 PM, Iain Duncan<iainduncan at telus.net> wrote:
> Hi, I'm new here so please tell me if this is the wrong list.
> I have a case where I want a class, ( the class object itself, not an
> instantiated class ) to provide an interface so that a utility look up
> can get me the class itself. This is working ok with:
> class IPet(PersistentResource):
>  implements(Pet)
>  classProvides(IResourceClass)
> but, all classes that inherit from PersistentResource should provide
> this too,

That's a matter of opinion.

> and this does not get inherited just by using classProvides in
> the definitiation of PersistentResource.
> Before I go making metaclasses and stuff, thought I should check if I am
> missing something simple!

No.  Class provides isn't inherited by design.


Jim Fulton

More information about the Zope3-users mailing list