Aprender de inmediato: https://edu.csdn.net/course/play/24797/282200?utm_source=blogtoedu
# Aumento异常使用 clase Test47: @property def theAge (auto): auto retorno .__ edad @ theAge.setter def theAge (auto, edad): si la edad> 30 o la edad <10: # #默认aumento RuntimeError # aumento ValueError aumento OSError (edad, '年龄输入错误') otra cosa: self .__ edad = edad # t47 = Test47 () # t47.theAge = 9 Proveedores: t47 = Test47 () t47.theAge = 8 , excepto OSError como e: print (e) de impresión (e.errno) de impresión (e.strerror) de impresión (e.args)