LearnFrenzy
Sign in Take a free test

Exception Handling · Exception Handling MCQ · Question 6

Why avoid a bare except? Answer, explanation & discussion

  • MCQ
  • Medium
  • 0 comments
  • Answer explained
  • Moderated community
Question 6 Back to Exercise

Why is except: with no exception type considered bad practice?

  • A It is a SyntaxError
  • B It catches nothing
  • C It slows the program down
  • D It catches every exception, including KeyboardInterrupt and programming mistakes, hiding bugs Correct
Correct Answer: Option D

Catch the specific exceptions you expect and can handle.

Discussion & Comments 0

Share your method, a shortcut, or ask about a step you didn't follow.

No comments yet. Be the first to share your solution!

Post your comment

Comments appear after a quick review by our team.

Search LearnFrenzy

Esc

Quick links