Skip to content

Instantly share code, notes, and snippets.

@rsp2k
Created May 17, 2017 01:41
Show Gist options
  • Save rsp2k/e0dd0ee8a41cf1e600cf9cfcb242a4ea to your computer and use it in GitHub Desktop.
Save rsp2k/e0dd0ee8a41cf1e600cf9cfcb242a4ea to your computer and use it in GitHub Desktop.
def my_decorator(some_function):
def wrapper():
print("Something is happening before some_function() is called.")
some_function()
print("Something is happening after some_function() is called.")
return wrapper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment