Skip to content

Instantly share code, notes, and snippets.

@orlp
Last active August 29, 2015 14:11
Show Gist options
  • Save orlp/cfeb949a4dc5800244f8 to your computer and use it in GitHub Desktop.
Save orlp/cfeb949a4dc5800244f8 to your computer and use it in GitHub Desktop.
def modify(f):
if some_external_input():
def modified_function(*args, **kwargs):
return f(*args, **kwargs) + 2
return modified_function
return f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment