def extra_funcs ( * funcs ) : def extra_funcs_decorator ( real_func ) : def wrapper ( * args , * * kwargs ) : return real_func ( * args , * * kwargs ) wrapper . extra_funcs = list ( funcs ) wrapper . source = inspect . getsource ( real_func ) wrapper . name = real_func . __name__ return wrapper return extra_funcs_decorator
python get pre decorated function
Decorator which adds extra functions to be downloaded to the pyboard .
def extra_funcs(*funcs):
  """Decorator which adds extra functions to be downloaded to the pyboard."""
  def extra_funcs_decorator(real_func):
    def wrapper(*args, **kwargs):
      return real_func(*args, **kwargs)
    wrapper.extra_funcs = list(funcs)
    wrapper.source = inspect.getsource(real_func)
    wrapper.name = real_func.__name__
    return wrapper
  return extra_funcs_decorator