transforms/inline: fix default values of positional args

This commit is contained in:
Sebastien Bourdeauducq 2014-11-19 22:55:34 -08:00
parent b736c30cdb
commit e01050b19a

View File

@ -111,7 +111,7 @@ def get_function_args(func_args, func_tr, args, kwargs):
# Replace any UndefinedArg positional arguments with the default value, # Replace any UndefinedArg positional arguments with the default value,
# when provided. # when provided.
for arg, default in zip(func_args.args[len(func_args.defaults):], for arg, default in zip(func_args.args[-len(func_args.defaults):],
func_args.defaults): func_args.defaults):
if r[arg.arg] is UndefinedArg: if r[arg.arg] is UndefinedArg:
r[arg.arg] = func_tr.code_visit(default) r[arg.arg] = func_tr.code_visit(default)