diff options
author | Emile Anclin <emile.anclin@logilab.fr> | 2010-10-28 15:47:55 +0200 |
---|---|---|
committer | Emile Anclin <emile.anclin@logilab.fr> | 2010-10-28 15:47:55 +0200 |
commit | 215f5df431c2d213bfeb250f575dbec806678149 (patch) | |
tree | b4675318ddc73eed604a86490818e422bd6b222e /as_string.py | |
parent | ffd49d83cbb6ac001e7244cbd5e91bfc9015c227 (diff) | |
download | astroid-git-215f5df431c2d213bfeb250f575dbec806678149.tar.gz |
py3k : introduce Starred node
Diffstat (limited to 'as_string.py')
-rw-r--r-- | as_string.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/as_string.py b/as_string.py index 781aa49d..02a028a0 100644 --- a/as_string.py +++ b/as_string.py @@ -407,7 +407,7 @@ class AsStringVisitor3k(AsStringVisitor): excs = 'except %s' % node.type.accept(self) else: excs = 'except' - return '%s:\n%s' % (excs, self._stmt_list(node.body)) + return '%s:\n%s' % (excs, self._stmt_list(node.body)) def visit_raise(self, node): """return an astng.Raise node as string""" @@ -418,6 +418,9 @@ class AsStringVisitor3k(AsStringVisitor): return 'raise %s' % node.exc.accept(self) return 'raise' + def visit_starred(self, node): + """return Starred node as string""" + return "*" + node.value.accept(self) if sys.version_info >= (3, 0): AsStringVisitor = AsStringVisitor3k |