Skip to content

Instantly share code, notes, and snippets.

@sloev
Created November 18, 2015 11:51
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 sloev/b58d4fb55b81063eba58 to your computer and use it in GitHub Desktop.
Save sloev/b58d4fb55b81063eba58 to your computer and use it in GitHub Desktop.
WS_INSTRUCTIONS = {}
from functools import wraps
def add_to_ws_lookup(func):
f_name = func.__name__
@wraps(func)
def wrapper(*args, **kwargs):
kwargs['this_func_name']=f_name
return func(*args, **kwargs)
tmp = wrapper
WS_INSTRUCTIONS[f_name] = tmp
return tmp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment