[Zope-dev] improving the utility and adapter lookup APIs
ws at gocept.com
Thu Nov 26 02:07:40 EST 2009
* On Nov 25, 2009, at 11:17 AM, Thomas Lotze wrote:
> > What about a simple and consistent API for all components including
> > utilities, adapters and multiadapters:
> > IFoo()
> > IFoo(x)
> > IFoo(x, y)
I quite like the simplicity of this spelling, so I want to be sure
*why* it must be ruled out. (...or does it, really?)
I'm thinking that this...
* Martijn Faassen <faassen at startifact.com> [2009-11-25 22:21]:
> The last one won't work if we want to maintain backwards compatibility.
> The second argument is the default.
is a valid argument, while this...
* Tres Seaver <tseaver at palladion.com> [2009-11-25 13:34]:
> You can't use an arbitrary number of positional arguments for the
> contexts, because we need to support the named / default cases too.
is not, as evidenced by...
* Fabio Tranchitella <kobold at kobold.it> [2009-11-25 20:51]:
> IFoo(x, y, default=None, name='something')
or am I missing something here?
So I'm thinking, there is no technical reason that prevents Thomas'
spelling, and I'm wondering, do we really have to preserve backwards
compatibility for this case?
More information about the Zope-Dev