def pass_obj(f):
 def new_func(*args, **kwargs):
  return f(get_current_context().obj, *args, **kwargs)
 return update_wrapper(new_func, f)

def pass_obj ( f ) : def new_func ( * args , ** kwargs ) : return f ( get_current_context ( ) . obj , * args , ** kwargs ) return update_wrapper ( new_func , f )
similar to :func:pass_context .