关于Exception这句话该怎么理解?
所有的标准/内建异常都是从根异常派生的.目前,有 3 个直接从 BaseException 派生的异常子类:SystemExit,KeyboardInterrupt 和 Exception.其他的所有的内建异常都是 Exception 的子类.到了 Python2.5,所有的异常的都是新风格(new-style)的类,并且最终都是 BaseException 的子类.
在这一版中,SystemExit 和 KeyboardInterrupt 从 Exception 的继承中移到 BaseException 的继
承下.这样可以允许如 except Exception 的语句捕获所有非控制程序退出的异常.
比较小白 我不是很懂 为什么SystemExit 和 KeyboardInterrupt 从 Exception 的继承中移到 BaseException 的继承下,就可以允许except Exception不惑所有异常, SystemExit和Keyboardlnterrupt继承于 Exception和继承于BaseException 对这些有什么影响吗?又有什么不同呢?