Last active
April 11, 2021 00:24
-
-
Save ofelix03/a87cdb0d72ebec3df1b54cdfe2200e7c 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