print(p.name) # 合法:调用__get_name p.name = "jerry" # 合法:调用__set_name print(p.name) # property中没有添加__del_name函数,所以不能删除指定的属性 del p.name # 错误:AttributeError: can't delete Attribute 好啦,python面向对象中属性的封装操作就暂时先聊到这里了......