[Zope-dev] make zope.component.registry.Components inherit from dict?
Tres Seaver
tseaver at palladion.com
Tue Nov 24 11:20:46 EST 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Martin Aspeli wrote:
> Martin Aspeli wrote:
>
>> I *do* actually like the "named IAnonymousUtility" thing as a
>> convenience, because it retains some consistency. Maybe it's slower,
>> which would be a negative. But it also allows all the other ZCA stuff
>> (overriding, introspection, global/local variants, etc) and API: we're
>> just introducing a convenience.
>
> Oh, and here's another reason: this allows registration at ZCML
> configuration time rather than import time (since we're not setting it
> up in Python) without inventing new directives:
>
> <utilty
> name="root"
> object=".roots.myRoot"
> provides="zope.component.IAnonymousUtility"
> />
>
> Or in Grok speak:
>
> grok.global_utility(myRoot, IAnonymousUtility, name="root")
>
> I think we'd want a less icky name than IAnonymousUtility, though.
Just use 'Interface'.
Tres.
- --
===================================================================
Tres Seaver +1 540-429-0999 tseaver at palladion.com
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAksMB9kACgkQ+gerLs4ltQ40UgCgyYBAKKKkwg0oAadLlpDkVefi
5KYAoKaPLUNyDhN8opoF5YWN33kdx3lw
=0dsx
-----END PGP SIGNATURE-----
More information about the Zope-Dev
mailing list