一个易于扩展的错误类,用于python类
py-error的Python项目详细描述
ES6错误
一个易于扩展的错误类,用于python类
为什么?
我之所以这样做是因为我希望能够为继承和类型扩展错误 检查。
用法
classmyClass(ExtendableError):# // __init__ is optional; you should omit it if you just want a custom error# // type for inheritance and type checkingdef__init__(self,message='OOps!'):super(message)
待办事项
- 测试