2014年1月31日星期五

E2

An exception is an event, which occurs during the execution of a program, that disrupts the normal flow of the program's instructions. In general, when a Python script encounters a situation that it can't cope with, it raises an exception. An exception is a Python object that represents an error.
When a Python script raises an exception, it must either handle the exception immediately otherwise it would terminate and come out.

Finally finish my e2...I thought I cannot make it when i first saw it, but surprisingly, I pass all the test case in auto marking. In e2b, it feels like that when catching the expectation E2O..., which is a subclass in E2Error, only if placing the subclass before the class can a expectation be caught. Actually, most of the idea and format are come from the research rather than my lecture note...A little bit sad.




没有评论:

发表评论