python中快速删除实例对象中的所有属性
def DeleteObjectAllProperties(objectInstance): if not objectInstance: return listPro =[key for key in objectInstance.__dict__.keys()] for key in listPro: objectInstance.__delattr__(key)
def DeleteObjectAllProperties(objectInstance): if not objectInstance: return listPro =[key for key in objectInstance.__dict__.keys()] for key in listPro: objectInstance.__delattr__(key)