摘要: getattr()函数是Python自省的核心函数,具体使用大体如下: 获取对象引用getattrGetattr用于返回一个对象属性,或者方法 Python代码 class A: def __init__(self): self.a = 'a' def method(self): print "me 阅读全文
posted @ 2017-04-24 15:26 红领巾下的大刀疤 阅读(363) 评论(0) 推荐(0)
/* 看板娘 */