Created
June 9, 2013 05:18
-
-
Save saurabh-hirani/5737741 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
#!/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