Created
October 19, 2019 03:28
-
-
Save adrianmarkperea/79e718de0c1f0d0e3d890a43920b8232 to your computer and use it in GitHub Desktop.
This file contains 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 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