[PEAK] Re: gf.when() doesn't honour Interfaces on instances (protocols.adviseObject)

Phillip J. Eby pje at telecommunity.com
Thu Dec 2 14:34:14 EST 2004


At 07:44 PM 12/2/04 +0100, Ulrich Eck wrote:
>i'm still finding my way into GenericFunctions and how to use them to
>build statemachine-like workflows - so i'll drop the "code once use
>everywhere" requirement for now - as all my software is written in peak
>- there is no problem ;-)

Note, by the way, that if you were using zope.interface interfaces, then 
it's quite possible you could create a dispatch.ITest implementation for 
Zope interfaces that would use the zope.interface introspection API to pull 
out all the Zope interfaces that an object implements, and figure out from 
that what to dispatch on.  It wouldn't be as fast as MRO-based or 
equality-based dispatching, but it could probably be done.

With PyProtocols interfaces, it would take a bit of hacking on the 
PyProtocols core, to add something like IInstanceInterfaceIntrospection, 
and change the built-in __conform__ to support it.




More information about the PEAK mailing list