Skip to content
CodeKruPro

Why is a bare except a problem?

QuizEasy-MediumPython onlyAsked in: Accenture, Capgemini, Cognizant, Infosys, TCS

Which statements about except: with no exception type are true? Pick all that apply.

  • It catches KeyboardInterrupt and SystemExit too
  • It catches only Exception subclasses
  • Wrapping a test step in try: ... except: pass can turn a failing check into a pass
  • Catching the specific error you expect is better

This question is part of Pro+

Pro+ opens every question in Interview Prep and the mock interview. Every article and the first 2 questions of each topic stay free. Hands-on Selenium and API tasks follow their course lesson's own lock.

See Pro+

Already have Pro+? Sign in