Skip to content

Instantly share code, notes, and snippets.

@saurabh-hirani
Created June 9, 2013 05:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saurabh-hirani/5737741 to your computer and use it in GitHub Desktop.
Save saurabh-hirani/5737741 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
def decorator(func):
def wrapper_around_func():
print "Decorator calling func"
func()
print "Decorator called func"
return wrapper_around_func
@decorator
def func():
print "In the function"
func()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment