Skip to content
Discussion options

You must be logged in to vote

RET506 is correct here.

If every branch of an if ends with raise (or return/break/continue), then the else/elif is unnecessary because the code after the block is only reachable when the condition wasn't met anyway.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by amyreese
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants