[Zope-dev] zope.component: calling an Interface and calling queryAdapter give differing results

Dieter Maurer dieter at handshake.de
Tue Sep 9 14:37:58 EDT 2008


Chris Withers wrote at 2008-9-8 18:34 +0100:
> ...
>> There's the backward-compatibility issue, which is a showstopper.
>> There's plenty of code that does this:
>> 
>>     adapter = package.interfaces.IFoo(object, None)
>> 
>> Changing the signature as you describe would break all code that does this.
>
>How about a new major revision of zope.interface then?

I fear that would be a bit drastic -- for a mostly cosmetic change.

But interfaces might grow an additional method, e.g. "adapt",
which could get the new signature.

The syntax would be a bit more cumbersome -- but on the other
hand, it would be more explicit :-)



-- 
Dieter


More information about the Zope-Dev mailing list