为什么双下划线开头不行
#正确 fun=getattr(self,'_%s_login'%text)
错误 ,报错AttributeError: 'LoginInterface' object has no attribute '__manager_login'
# fun=getattr(self,'__%s_login'%text)
这个要看类的定义了。它定义属性就是定义的双下划线开头(表示私有属性)。所以你调用也得一致才行。