Created
June 8, 2016 14:40
-
-
Save fereria/4de295736b79c1c32df6d1c1ae7bf652 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
# -*- coding: utf-8 -*- | |
def test_val(num): | |
def _deco(func): | |
def _func(*args, **kwargs): | |
print u"---func name---" | |
print func.__name__ | |
print u"---------------" | |
return func(*args, **kwargs) | |
return _func | |
return _deco | |
@test_val(10) | |
def aaa(a, b): | |
print 'hello world' | |
aaa(20, 30) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment