[PEAK] Re: ruledispatch

Phillip J. Eby pje at telecommunity.com
Thu Mar 16 14:13:36 EST 2006


At 09:30 AM 3/16/2006 +0100, Elvelind Grandin wrote:
>Okay. so from what I understand method_chain look like the thing I want to 
>use.

Probably 'method_chain(all_methods(grouped_cases))' is what you want.


>But I'm still confused on how to use it.
>Do I need to create my own Class that extends something and pass i to
>dispatch.generic() ?

Yes.


>On 3/15/06, Phillip J. Eby <pje at telecommunity.com> wrote:
> > At 12:19 PM 3/15/2006 +0100, Elvelind Grandin wrote:
> > >Hi again.
> > >
> > >One followup question.
> > >When two rules applies equally there is an exception raised. Is it
> > >possible to tell it to use the first of those two rules instead. So
> > >that it always falls back to some function.
> >
> > Yes, by using a custom method combination.  See:
> >
> > http://peak.telecommunity.com/DevCenter/CombiningResults
> >
> > or 'combiners.txt' inside the dispatch package source.
> >




More information about the PEAK mailing list