24 Nov
2009
24 Nov
'09
3:41 a.m.
Hi Chris, On 2009-11-24, at 0324, Chris McDonough wrote:
In repoze.bfg, we've actually decided to use a subclass of the component registry which also inherits from "dict". This makes it possible to spell 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') involved? 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? Matt