[Python-3000] Abilities / Interfaces

Gustavo Niemeyer gustavo at niemeyer.net
Thu Nov 23 03:00:54 CET 2006


> I don't quite see how that works. Where exactly is
> the adaptation supposed to be done? It can't be done
> in libapple, because libfruit didn't exist when it
> was written. Is libfruit supposed to adapt everything
> it's given to IFruit just in case it's necessary?
> That seems like a lot of extra work to go to, both
> at coding time and run time, for no immediate benefit.

The user of both libraries may define how Apple adapts to
IFruit.  Being able to define adapters for things that weren't
previously prepared for it is one of the usage cases for the
component architecture in Zope 3.  The mentioned example is a
bad one for generic functions, specifically.

Look at the more recent mail for a more concrete example than
this one, which validates the same point of view for both
generic functions and adaptation.

-- 
Gustavo Niemeyer
http://niemeyer.net


More information about the Python-3000 mailing list