def argument_getter_factory(route_spec):
func_sig = inspect.signature(route_spec.handler_func)<EOL>param_names = list(func_sig.parameters.keys())<EOL>arg_getters  = build_argval_getters(route_spec)<EOL>n_args = len(arg_getters)<EOL>async def argument_getters(request):<EOL><INDENT>errors = None<EOL>values = {}<EOL>for i in range(n_args):<EOL><INDENT>try:<EOL><INDENT>arg_name = param_names[i]<EOL>values[arg_name] = await arg_getters[i](request)<EOL><DEDENT>except HTTPException:<EOL><INDENT>raise<EOL><DEDENT>except Exception as exc :<EOL><INDENT>if errors is None: <EOL><INDENT>errors = []<EOL><DEDENT>request.app.logger.error('<STR_LIT>', exc_info=True)<EOL>exc_type = type(exc)<EOL>data = {<EOL>"<STR_LIT:name>": arg_name, <EOL>"<STR_LIT:type>": f"<STR_LIT>",<EOL>"<STR_LIT:error>": str(exc)<EOL>}<EOL>errors.append(data)<EOL><DEDENT><DEDENT>if errors is not None:<EOL><INDENT>raise RESTfulArgumentError(errors)<EOL><DEDENT>return values<EOL><DEDENT>return argument_getters<EOL>
根据spec来生成handler函数参数值读取器