[Zope3-dev] nevermind (was Re: best practices for registry-like functionality)

Garrett Smith garrett at mojave-corp.com
Thu Apr 8 20:18:46 EDT 2004


Garrett Smith wrote:

> As for:
> 
>  >> - Get a list of all registered vocab objects
> 
> Is there a way to enumerate registered utilities that provide a 
> particular interface?

I suppose I could just read the spec for utility service, huh ;-)

     def getRegisteredMatching(interface=None, name=None):
         """Return the registered utilities.
         ...
         """

> Btw, if this is a use case for utilities, 'singleton' would be a 
> misleading term. The term 'utility' is a bit of a stretch for that 
> matter. We're talking about 'named objects, registered for a site, that 
> provide a particular interface'. A good term doesn't come to mind, but 
> it seems to me worth some more consideration.

I think this bit is still valid though.

  -- Garrett




More information about the Zope3-dev mailing list