python相似功能函数重定义 python中用函数指针实现相似功能函数重定义 class MethodSelect: Func_Method1 = 1 Func_Method2 = 2 Func_Method3 = 3 def __init__(self,MethodIdx): self.initFunc() self