# 对象属性相关的四个内置函数

hasattr(object, 'name')

getattr(object, 'name', 'default')  # AttributeError

setattr(object, 'name', 'value')

delattr(object, 'name')  # AttributeError


# 对象属性相关的四个内置函数

hasattr(object, 'name')

getattr(object, 'name', 'default')  # AttributeError

setattr(object, 'name', 'value')

delattr(object, 'name')  # AttributeError


# 对象属性相关的四个内置函数 # AttributeError # AttributeError