[Zope-dev] make zope.component.registry.Components inherit from dict?
matthew at matthewwilkes.co.uk
Mon Nov 23 22:41:33 EST 2009
On 2009-11-24, at 0324, Chris McDonough wrote:
> In repoze.bfg, we've actually decided to use a subclass of the
> registry which also inherits from "dict". This makes it possible to
> common unnamed "utility" registrations and lookups as:
> utility = SomeUtilityImplementation()
> registry['someutility'] = utility
While I'm all for simplification, this makes very little sense to me.
If this is an unnamed registration why is there a name ('someutility')
If it was a named registration against Interface, or if the key was an
interface/dotted name that'd make sense.
Could you expand on what the key is supposed to represent?
More information about the Zope-Dev