Skip to content

Instantly share code, notes, and snippets.

@gbromios
Created October 17, 2014 12:36
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 gbromios/090506391764e8e80c9a to your computer and use it in GitHub Desktop.
Save gbromios/090506391764e8e80c9a to your computer and use it in GitHub Desktop.
def italic(f):
def wrapper(blah):
return "<i>{0}</i>".format(f(blah))
return wrapper
@italic
def repeat_three_times(blah):
return (str(blah)+' ') * 3
>>> repeat_three_times('test')
'<i>test test test </i>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment