Skip to content

Instantly share code, notes, and snippets.

@pknam
Created August 4, 2015 06:17
Show Gist options
  • Save pknam/0b5908109157d77d7f9f to your computer and use it in GitHub Desktop.
Save pknam/0b5908109157d77d7f9f to your computer and use it in GitHub Desktop.
#--*-- 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