[Zope-dev] the ZCA API decision
Brian Sutherland
brian at vanguardistas.net
Fri Dec 4 02:36:30 EST 2009
On Thu, Dec 03, 2009 at 06:41:03PM +0100, Martijn Faassen wrote:
> Hi there,
>
> I think we've had enough discussion to make a decision. Hopefully
> everybody is at least reasonably happy with this:
>
> An "adapt()" method will be added to Interface. It takes the objects to
> adapt as *args, and optional but explicit 'default' and 'name' aguments.
>
> A "utility()" method will be added to Interface. It takes optional but
> explicit 'default' and 'name' arguments.
>
> On the adapter hook (__call__) we will deprecate the implicit second
> argument for defaults, with a deprecation warning. Instead, we will
> require people to write out 'default=' explicitly. Otherwise its
> behavior remains unchanged. I think we can motivate this change purely
> because IFoo(bar, baz) really is quite surprising compared to IFoo(bar,
> default=baz).
FWIW, I'm +1 as well.
--
Brian Sutherland
More information about the Zope-Dev
mailing list