摘要:
class Person: def __init__(self): self.name = '小王' p = Person() print(hasattr(p, 'name')) # hasattr(object, name):判断一个对象里面是否有name属性或者name方法,返回BOOL值 pr 阅读全文
摘要:
https://blog.csdn.net/ManyPeng/article/details/92816138 阅读全文