Quiz · 3 questions
🛡️ Errors — Things Will Break, Plan For It
try / EAFP / context manager / exception group
Level 0Curious
0 XP0/93 lessons0/23 achievements
0/100 XP to next level100 XP to go0% complete
Quiz
01Why is
except: (bare) almost always wrong?Hint
What does
BaseException include that Exception doesn't?02What's the EAFP idiom in Python?
Hint
It's a Python preference, not an acronym for an algorithm.
03What does the
from keyword in raise NewException from old_exc do?Hint
The traceback shows both exceptions when you use
from.Comments 0
🔔 Reply notifications (sign in)Sign in — Please sign in to comment.
No comments yet — be the first.