Python中的异常处理,梳理&总结!

python提供了两个很是重要的功能来处理python程序在运行中出现的异常和错误。你可使用该功能来调试python程序。 1.python标准异常: 异常名称 描述 BaseException 全部异常的基类 SystemExit 解释器请求退出 KeyboardInterrupt 用户中断执行(一般是输入^C) Exception 常规错误的基类 StopIteration
相关文章
相关标签/搜索