摘要: """ 反射 """ class A(): def func(self): """ 实例函数 """ return "func" @classmethod def func2(cls): """ 类函数 """ return "func2" """ 在使用 getattr 反射的时候 需要注意是否是 阅读全文
posted @ 2020-12-08 11:08 Yuan_x 阅读(66) 评论(0) 推荐(0) 编辑