Skip to content

Instantly share code, notes, and snippets.

@moskytw
Created May 10, 2014 08:35
Show Gist options
  • Save moskytw/09ed2509e5e6bd86686f to your computer and use it in GitHub Desktop.
Save moskytw/09ed2509e5e6bd86686f to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
def deco(f):
def f_warpper(*args, **kagrs):
print 'Hi, I am f_warpper.'
return f(*args, **kagrs)
return f_warpper
@deco
def f():
print 'Hi, I am f.'
return 1
if __name__ == '__main__':
print f()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment