Peter Otten wrote: > func_dict = {A: do_something_with_A, > B: do_something_with_B} > def func(obj): > func_dict[obj.__class__](obj) ok. it tested and it works. thanks. now I have only to check if the Visitor Pattern is not more appropriate. cheers, curzio