Skip to content

Instantly share code, notes, and snippets.

@PeterJCLaw
Created June 26, 2011 21:16
Show Gist options
  • Save PeterJCLaw/1047982 to your computer and use it in GitHub Desktop.
Save PeterJCLaw/1047982 to your computer and use it in GitHub Desktop.
def call(f, *args, **kwargs):
def g(event):
if f.can_accept_event:
args.insert(0, event)
return f(*args, **kwargs)
return g
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment