-
-
Save lahwran/05f6f59e66a5358bfaa5 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
def decorator(func): | |
print "decorating function with doc:", func.__doc__ | |
return func | |
@decorator | |
def examplefunc(): | |
"doc!" | |
# equivalent to | |
def examplefunc2(): | |
"doc!" | |
examplefunc2 = decorator(examplefunc2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment