Last active
June 8, 2016 14:44
-
-
Save fereria/7356dc41355be7a3d783e6c8eb92175c 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 -*- | |
import inspect | |
def test_val(num): | |
def _deco(func): | |
def _func(*args, **kwargs): | |
print u"---func filepath---" | |
print inspect.getfile(func) | |
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