Skip to content

Instantly share code, notes, and snippets.

@skimbrel
Last active August 29, 2015 13:57
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 skimbrel/9556011 to your computer and use it in GitHub Desktop.
Save skimbrel/9556011 to your computer and use it in GitHub Desktop.
def footgun(f):
@functools.wraps(f)
def wrapper(*args, **kwargs):
if f(*args, **kwargs):
return frobnicate(f(*args, **kwargs))
return wrapper
@footgun
def side_effecting():
print "lol wut"
return True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment