[Zope3-dev] adaptation based on class rather than interface
Jim Fulton
jim at zope.com
Thu Nov 9 09:46:32 EST 2006
Chris Withers wrote:
> Hi All,
>
> I find myself often having to define pure marker interfaces for each
> class that I define, purely so I can register adapters for objects of
> that class.
>
> How do people feel about:
>
> - being able to register an adapter as follows:
>
> <adapter
> for=".myclasses.MyClass"
> provides=".interfaces.ISomething"
> factory=".adapters.MyAdapter"
> />
I think it is a fine idea. That's why it has been supported for
a long time. You can register adapters and views (which, of course
are adapters) for classes as well as interfaces.
Jim
--
Jim Fulton mailto:jim at zope.com Python Powered!
CTO (540) 361-1714 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org
More information about the Zope3-dev
mailing list