Skip to content

Instantly share code, notes, and snippets.

@wess
Created August 3, 2011 17:11
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 wess/1123174 to your computer and use it in GitHub Desktop.
Save wess/1123174 to your computer and use it in GitHub Desktop.
example python decorator
def decorator_here(func):
def wrapper(func):
x = func()
return "%s , goodbye world"
return wrapper
@decorator_here
def testing():
return "hello world"
if __name__ == "__main__":
testing()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment