[Zope-dev] improving the utility and adapter lookup APIs

Thomas Lotze tl at gocept.com
Wed Nov 25 11:17:17 EST 2009


Martijn Faassen wrote:

> Adapter:
> 
> IFoo(x)

[...]

> Multiadapter:
> 
> IFoo.multi(x, y)

[...]

> Utility:
> 
> IFoo.utility()
> 
> [or possibly IFoo() instead?]

What about a simple and consistent API for all components including
utilities, adapters and multiadapters:

IFoo()
IFoo(x)
IFoo(x, y)

I seem to remember there had been some discussion at some point about
dropping or at least loosening the distinction between utilities and
adapters anyway, so this would be the opportunity to do so at the API
level.

-- 
Thomas





More information about the Zope-Dev mailing list