Created
July 12, 2020 09:46
-
-
Save rec/ab9690b726e23d5811a58627a53f7fa3 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Almost right | |
def print_before3(label='DEBUG:'): | |
def decorator(func): | |
@functools.wraps(func) | |
def wrapped(*args, **kwds): | |
print(label, func.__name__, args, kwds) | |
return func(*args, **kwds) | |
return wrapped | |
return decorator | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment