summaryrefslogtreecommitdiffstats
path: root/Lib/lib2to3/fixer_util.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/lib2to3/fixer_util.py')
-rw-r--r--Lib/lib2to3/fixer_util.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/lib2to3/fixer_util.py b/Lib/lib2to3/fixer_util.py
index 2b1cea5..4b5ca34 100644
--- a/Lib/lib2to3/fixer_util.py
+++ b/Lib/lib2to3/fixer_util.py
@@ -51,12 +51,12 @@ def Dot():
def ArgList(args, lparen=LParen(), rparen=RParen()):
"""A parenthesised argument list, used by Call()"""
- return Node(syms.trailer,
- [lparen.clone(),
- Node(syms.arglist, args),
- rparen.clone()])
+ node = Node(syms.trailer, [lparen.clone(), rparen.clone()])
+ if args:
+ node.insert_child(1, Node(syms.arglist, args))
+ return node
-def Call(func_name, args, prefix=None):
+def Call(func_name, args=None, prefix=None):
"""A function call"""
node = Node(syms.power, [func_name, ArgList(args)])
if prefix is not None: