Am 13.06.2011, 17:01 Uhr, schrieb Chris Withers <ch...@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
> 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.
Clark Consulting & Research
Zope-Dev maillist - Zope-Dev@zope.org
** No cross posts or HTML encoding! **
(Related lists -