shanau2

导航

 

2018年12月21日

摘要: 反射都是操作对象中的__dict__的内容 class Student: def study(self): print("正在学习....") stu = Student() if not hasattr(stu,"name"): setattr(stu,"name","比格") print(stu 阅读全文
posted @ 2018-12-21 15:03 shanau2 阅读(122) 评论(0) 推荐(0)