Skip to content

Instantly share code, notes, and snippets.

@jianghu52
Created June 8, 2014 02:41
Show Gist options
  • Save jianghu52/2bf04db06fa20ec7dc11 to your computer and use it in GitHub Desktop.
Save jianghu52/2bf04db06fa20ec7dc11 to your computer and use it in GitHub Desktop.
def callfunction(name):
def warp(f):
def warp1(*args):
print "the caller is "+ name
f()
return warp1
return warp
@callfunction("xman")
def f(*args):
print "f start"
if __name__ == '__main__':
f()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment