[Zope-dev] component registry navelgazing
Charlie Clark
charlie.clark at clark-consulting.eu
Mon Jun 13 11:56:26 EDT 2011
Am 13.06.2011, 17:01 Uhr, schrieb Chris Withers <chris at simplistix.co.uk>:
> I have something, I want something that implements IWhatever.
> Now, it may well be that something implements IWhatever, but it may
> also not. As the author of the code in question, I don't want to have to
> care.
> Other authors can plug in adapters for the cases where something
> doesn't implement IWhatever
I can appreciate the use case but not the semantics - you are not looking
for an adapter but an implementation. I guess this is related to the
IWhatever(object) approach which does the magic for you. I guess
queryProvider(object, interface) would be a better spelling for that use
case, which may be more general than I'm suggesting.
Charlie
--
Charlie Clark
Managing Director
Clark Consulting & Research
German Office
Helmholtzstr. 20
Düsseldorf
D- 40215
Tel: +49-211-600-3657
Mobile: +49-178-782-6226
More information about the Zope-Dev
mailing list