Created
December 6, 2014 17:12
-
-
Save spetroll/979d3cfe07128347f24b to your computer and use it in GitHub Desktop.
Log
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
from functools import wraps | |
def log(f): | |
@wraps(f) | |
def wrapper(*args, **kwds): | |
result = f(*args,**kwds) | |
print "{}({})".format(f.__name__, args) | |
return result | |
return wrapper |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment