QuestionQ163

VerifiedFunctions and Exceptions

Choose the true statements about the try-except block shown below.

Question Image

Choose three
Explanation

Syntax errors are parsing errors, so invalid source within a try suite prevents that try statement from running and cannot be caught by its own except clause. Exceptions that occur during execution of the try suite are handled by a matching except clause; after that handler completes normally, execution continues after the try statement. An error raised inside an except handler is not handled by another handler of the same try statement. Code that may raise an exception should be placed in the try suite.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!