diff options
author | Emile Anclin <emile.anclin@logilab.fr> | 2010-10-28 14:00:35 +0200 |
---|---|---|
committer | Emile Anclin <emile.anclin@logilab.fr> | 2010-10-28 14:00:35 +0200 |
commit | c6631372e49a3e99e1f85e35f36fcb00dd914529 (patch) | |
tree | 4712c8bbc9412ee1caa074da1b03320f9e8abb31 /as_string.py | |
parent | 8d30f527c35205d30ca435f9c1afb32f4e96de8c (diff) | |
download | astroid-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.py | 8 |
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""" |