摘要: 实现StaticMethod,完成staticmethod装饰器功能 实现ClassMethod,完成classmethod装饰器功能 class StaticMethod: def __init__(self,fn): print('StaticMethod Init') self.fn=fn d 阅读全文
posted @ 2020-10-07 22:54 ascertain 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 运行时,区别于编译时,指的是程序被加载到内存中执行的时候 反射,reflection,指的是运行时获取类型定义的信息 一个对象能够在运行时,像找镜子一样,反射处其类型信息 在Python中,能够通过一个对象,找出其type,class,attribute,method的能力,称为反射或自省 具有反射 阅读全文
posted @ 2020-10-07 12:59 ascertain 阅读(160) 评论(0) 推荐(0) 编辑