if cond: meth = obj1.foo else: meth = obj2.bar meth()