def with_settings(*arg_settings, **kw_settings):
 def outer(func):
  @wraps(func)
  def inner(*args, **kwargs):
   with settings(*arg_settings, **kw_settings):
    return func(*args, **kwargs)
  return _wrap_as_new(func, inner)
 return outer

def with_settings ( * arg_settings , ** kw_settings ) : def outer ( func ) : @ wraps ( func ) def inner ( * args , ** kwargs ) : with settings ( * arg_settings , ** kw_settings ) : return func ( * args , ** kwargs ) return _wrap_as_new ( func , inner ) return outer
decorator equivalent of fabric .