[Zope-dev] ZCA proposal
Martijn Faassen
faassen at startifact.com
Thu Dec 3 07:00:35 EST 2009
Gary Poster wrote:
> I think I could get fully behind the following proposal that others
> have made (Shane I think was one of several?).
>
> IFoo.adapt(...)
>
> IFoo.utility(...)
I was thinking people would get behind the following proposal:
IFoo()
for adaptation and multi adaptation (with tuple arguments)
and
IFoo.utility()
for utility lookups.
One argument in favor of using plain calls for multi adaptation (using
tuples) is that people have already discussed various alternative names
to 'adapt' in just this little thread... The other argument is that we
would avoid too many ways to do it.
Even though I thought we had good consensus on it originally, since then
I've seen an argument against a deprecation warning of implicit default
on IFoo(). It is a separate discussion. I'd be in favor of it as I think
the implicit default argument on IFoo() is not that common (and actually
quite hard to read!), but we could easily separate that from this
discussion.
It would break the backwards compatibility of adapting a tuple using the
adapter hook. I think that's a risk we could take.
Regards,
Martijn
More information about the Zope-Dev
mailing list