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
KeyboardInterruptandSystemExittoo - It catches only
Exceptionsubclasses - Wrapping a test step in
try: ... except: passcan 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.