while this class is effective for demonstrating exceptions in actionit isn' very good at its job it is still possible to get other values into the list using index notation or slice notation this can all be avoided by overriding other appropriate methodssome of which are double-underscore methods the effects of an exception when an exception is raisedit appears to stop program execution immediately any lines that were supposed to run after the exception is raised are not executedand unless the exception is dealt withthe program will exit with an error message take look at this simple functiondef no_return()print(" am about to raise an exception"raise exception("this is always raised"print("this line will never execute"return " won' be returnedif we execute this functionwe see that the first print call is executed and then the exception is raised the second print statement is never executedand the return statement never executes eitherno_return( am about to raise an exception traceback (most recent call last)file ""line in file "exception_quits py"line in no_return raise exception("this is always raised"exceptionthis is always raised furthermoreif we have function that calls another function that raises an exceptionnothing will be executed in the first function after the point where the second function was called raising an exception stops all execution right up through the function call stack until it is either handled or forces the interpreter to exit to demonstratelet' add second function that calls the earlier onedef call_exceptor()print("call_exceptor starts here "no_return(print("an exception was raised "print(so these lines don' run"