Skip to content

Instantly share code, notes, and snippets.

@CEZERT
Created March 13, 2022 21:54
Show Gist options
  • Save CEZERT/7e84a7aefbfc90f9dd9fb5afdf812afd to your computer and use it in GitHub Desktop.
Save CEZERT/7e84a7aefbfc90f9dd9fb5afdf812afd to your computer and use it in GitHub Desktop.
import functools
def decorator(func):
@functools.wraps(func)
def wrapper_decorator(*args, **kwargs):
# Do something before
value = func(*args, **kwargs)
# Do something after
return value
return wrapper_decorator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment