[PEAK] Dispatching without generic functions.

Gabriel Jägenstedt gabriel.j at telia.com
Tue Jul 25 12:55:32 EDT 2006


Thank you!

Phillip J. Eby wrote:
> At 12:33 PM 7/25/2006 +0200, Gabriel Jägenstedt wrote:
>> def drink3(n):
>>     print 'You choose 3'
>>
>> How would this last method be added to drink? The rule that should be
>> passed can easily be stored in a dictionary or list or tuple or whatever
>> but I don't know how to make it work.
> 
>     drink.when(condition_string)(callable_action_object)
> 
> 



More information about the PEAK mailing list