发布网友 发布时间:2022-04-24 17:35
共1个回答
热心网友 时间:2022-04-29 14:24
对类实例化的结果就是产生一个该类的对象
实例化是action
对象是value
class MyException(Exception):
pass
class ValidationError(Exception):
def __init__(self, message, errors):
# Call the base class constructor with the parameters it needs
super(ValidationError, self).__init__(message)
# Now for your custom code...
self.errors = errors