Skip to content

Instantly share code, notes, and snippets.

@copocaneta
Last active December 9, 2024 23:12
Show Gist options
  • Save copocaneta/9108025f265aed30d3cd0729a87c3835 to your computer and use it in GitHub Desktop.
Save copocaneta/9108025f265aed30d3cd0729a87c3835 to your computer and use it in GitHub Desktop.
Improve this code by uncluttering methods
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