Ron Adam wrote: > You might be able to use a dictionary of tuples. > > call_obj = {(type_obj1,0):obj1a, > (type_obj1,0):obj1b, > (type_boj2,1):obj2a, > (type_obj2,1):obj2b, > etc... } > call_obj[(type_of_obj,order)]() > > > Regards, Ron
This won't work like I was thinking it would. But to get back to your is there a ? operator question... Try this. def foo(): return "foo" def boo(): return "boo" print (foo, boo)[1>0]() # prints "boo" print (foo, boo)[1<0]() # prints "foo" Regards, Ron -- http://mail.python.org/mailman/listinfo/python-list