[Zope3-dev] simple adapting (was Re: Container interface
issues)
Phillip J. Eby
pje at telecommunity.com
Wed Sep 17 12:34:42 EDT 2003
At 10:12 AM 9/17/03 -0400, Shane Hathaway wrote:
>Obviously it's not open for discussion in this context, but maybe in an
>alternate universe you could spell it like this:
>
>container.IAddTarget::addObject(name, object)
or under PEP 246:
adapt(container,IAddTarget).addObject(name, object)
or, in a hypothetical future version of Python using Pyrex typecast syntax
for adaptation:
<IAddTarget>container.addObject(name, object)
>The idea is that adapters are so common that they become a part of the
>language. Objects no longer have a finite namespace of methods and
>attributes. The language becomes more organic and polymorphic than ever
>before. (It could also develop whole new classes of bugs, so I'm not
>entirely certain it would be a *good* idea. ;-) )
As long as adapters remain distinct objects from their adaptees, I don't
see a problem.
More information about the Zope3-dev
mailing list