摘要: 异常是指程序中的例外,违例情况。异常机制是指程序出现错误后,程序的处理方法。当出现错误后,程序的执行流程发生改变,程序的控制权转移到异常处理。Exception类是常用的异常类,该类包括StandardError,StopIteration, GeneratorExit, Warning等异常类。StandardError类是python中的错误异常,如果程序上出现逻辑错误, 将引发该异常。Sta... 阅读全文
posted @ 2016-11-29 17:31 偶然相遇 阅读(17138) 评论(0) 推荐(1) 编辑
摘要: 下面的是来自python help document的说明: Assert statements are a convenient way to insert debugging assertions into a program: assert语句是一种插入调试断点到程序的一种便捷的方式。 ass 阅读全文
posted @ 2016-11-29 17:20 偶然相遇 阅读(207) 评论(0) 推荐(0) 编辑