Created
April 11, 2021 00:17
-
-
Save ofelix03/25b2f5503765d39a06f7ad6b6113c565 to your computer and use it in GitHub Desktop.
raising-exceptions-inside-if-conditionals-better
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if something_is_wrong: | |
| raise Exception("Something is wrong") | |
| # perform appropriate action |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment