[Zope3-dev] Allowing views to be registered for classes ratherthan interfaces.

Jim Fulton jim@zope.com
Fri, 18 Jul 2003 13:27:59 -0400


Phillip J. Eby wrote:

...

>> Wouldn't it be rather complicated to make the interface registries
>> and lookup code now also work with classes? Code that just uses
>> interfaces sounds easier to optimize too.
> 
> 
> You could always "borrow" code from PyProtocols, which uses type-based 
> registries as a mechanism for both declaring that classes implement 
> interfaces, *and* as a way of handling adapters between interfaces.  
> There's C code to speed up the critical path of lookup operations,

Actually, Steve and I decided we'd allow adapters of classes a while ago.
It will be implemented as part of an upcoming adapter-geddon, which will
also unify adapters, views, and utilities via n-ary adapters.

Jim

-- 
Jim Fulton           mailto:jim@zope.com       Python Powered!
CTO                  (703) 361-1714            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org