Created
June 23, 2016 20:33
-
-
Save lykkin/cfae92c6ebc44deb9b5266dfc370f644 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 log(f): | |
def logging_wrap(*args, **kwargs): | |
print 'init', args, kwargs | |
return f(*args, **kwargs) | |
return logging_wrap | |
@log | |
def test(*args): | |
return reduce(lambda a, b: a + b, args, 0) | |
test(1, 2, 3) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment