diff options
Diffstat (limited to 'Lib/lib2to3/fixes/fix_apply.py')
-rw-r--r-- | Lib/lib2to3/fixes/fix_apply.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/lib2to3/fixes/fix_apply.py b/Lib/lib2to3/fixes/fix_apply.py index 5af13b7..99cd21a 100644 --- a/Lib/lib2to3/fixes/fix_apply.py +++ b/Lib/lib2to3/fixes/fix_apply.py @@ -33,25 +33,25 @@ class FixApply(fixer_base.BaseFix): func = results["func"] args = results["args"] kwds = results.get("kwds") - prefix = node.get_prefix() + prefix = node.prefix func = func.clone() if (func.type not in (token.NAME, syms.atom) and (func.type != syms.power or func.children[-2].type == token.DOUBLESTAR)): # Need to parenthesize func = parenthesize(func) - func.set_prefix("") + func.prefix = "" args = args.clone() - args.set_prefix("") + args.prefix = "" if kwds is not None: kwds = kwds.clone() - kwds.set_prefix("") + kwds.prefix = "" l_newargs = [pytree.Leaf(token.STAR, "*"), args] if kwds is not None: l_newargs.extend([Comma(), pytree.Leaf(token.DOUBLESTAR, "**"), kwds]) - l_newargs[-2].set_prefix(" ") # that's the ** token + l_newargs[-2].prefix = " " # that's the ** token # XXX Sometimes we could be cleverer, e.g. apply(f, (x, y) + t) # can be translated into f(x, y, *t) instead of f(*(x, y) + t) #new = pytree.Node(syms.power, (func, ArgList(l_newargs))) |