Created
August 4, 2015 06:17
-
-
Save pknam/0b5908109157d77d7f9f 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 arg_log(func): | |
def dec(*args, **kwargs): | |
print args # list형식. 위치기반 인자정보 | |
print kwargs # dictionary 형식. 이름있는 인자정보 | |
func(*args, **kwargs) | |
return dec | |
@arg_log | |
def hihi(a, s, b): | |
print "in hihi" | |
hihi(2, "sdf", b=3) | |
hihi(*(2, 'asdf'), **{'b':4}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment