Last active
December 9, 2024 23:12
-
-
Save copocaneta/9108025f265aed30d3cd0729a87c3835 to your computer and use it in GitHub Desktop.
Improve this code by uncluttering methods
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
def function(): | |
print("Start of the function") | |
try: | |
# ... main code of the function ... | |
except Exception as e: | |
print(f"Error in function: {e}") | |
def another_function(): | |
print("Start of the function") | |
try: | |
# ... main code of another function ... | |
except Exception as e: | |
print(f"Error in another_function: {e}") | |
# Calling the functions | |
function() | |
another_function() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment