Skip to content

Instantly share code, notes, and snippets.

@adrianmarkperea
Created October 19, 2019 03:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adrianmarkperea/79e718de0c1f0d0e3d890a43920b8232 to your computer and use it in GitHub Desktop.
Save adrianmarkperea/79e718de0c1f0d0e3d890a43920b8232 to your computer and use it in GitHub Desktop.
def debug_transformer(fun):
def wrapper():
print(f'Function `{fun.__name__}` called')
res = fun() # get reference to original return value
print(f'Function `{fun.__name__}` finished')
return res
return wrapper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment