Re: ZCA proposal

Martijn Faassen <[email protected]>
Newsgroups gmane.comp.web.zope.devel
Message-ID <[email protected]>
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

_______________________________________________
Zope-Dev maillist  -  [email protected]
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.