summaryrefslogtreecommitdiff
path: root/as_string.py
diff options
context:
space:
mode:
authorEmile Anclin <emile.anclin@logilab.fr>2010-10-28 14:00:35 +0200
committerEmile Anclin <emile.anclin@logilab.fr>2010-10-28 14:00:35 +0200
commitc6631372e49a3e99e1f85e35f36fcb00dd914529 (patch)
tree4712c8bbc9412ee1caa074da1b03320f9e8abb31 /as_string.py
parent8d30f527c35205d30ca435f9c1afb32f4e96de8c (diff)
downloadastroid-git-c6631372e49a3e99e1f85e35f36fcb00dd914529.tar.gz
as_string: fix callfunc and test module2.py returned identically
Diffstat (limited to 'as_string.py')
-rw-r--r--as_string.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/as_string.py b/as_string.py
index 3dd17ddf..4259274e 100644
--- a/as_string.py
+++ b/as_string.py
@@ -113,12 +113,12 @@ class AsStringVisitor(ASTVisitor):
def visit_callfunc(self, node):
"""return an astng.CallFunc node as string"""
expr_str = node.func.accept(self)
- args = ', '.join([arg.accept(self) for arg in node.args])
+ args = [arg.accept(self) for arg in node.args]
if node.starargs:
- args += ', *%s' % node.starargs.accept(self)
+ args.append( '*' + node.starargs.accept(self))
if node.kwargs:
- args += ', **%s' % node.kwargs.accept(self)
- return '%s(%s)' % (expr_str, args)
+ args.append( '**' + node.kwargs.accept(self))
+ return '%s(%s)' % (expr_str, ', '.join(args))
def visit_class(self, node):
"""return an astng.Class node as string"""