python——hasattr()

hasattr() 函数用于判断对象是否包含对应的属性

语法:hasattr(object, name)

posted @ 2019-05-26 19:38  iPresent  阅读(322)  评论(0编辑  收藏  举报