summaryrefslogtreecommitdiff
path: root/as_string.py
diff options
context:
space:
mode:
authorEmile Anclin <emile.anclin@logilab.fr>2010-10-28 16:07:24 +0200
committerEmile Anclin <emile.anclin@logilab.fr>2010-10-28 16:07:24 +0200
commit7dad421fabf708e96eab40f8327ce8cd46e900ae (patch)
treed92116586707b70fd1b8deb7eb0e1fe97e864370 /as_string.py
parent215f5df431c2d213bfeb250f575dbec806678149 (diff)
downloadastroid-git-7dad421fabf708e96eab40f8327ce8cd46e900ae.tar.gz
py3k : introduce Nonlocal node
Diffstat (limited to 'as_string.py')
-rw-r--r--as_string.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/as_string.py b/as_string.py
index 02a028a0..76051111 100644
--- a/as_string.py
+++ b/as_string.py
@@ -409,6 +409,10 @@ class AsStringVisitor3k(AsStringVisitor):
excs = 'except'
return '%s:\n%s' % (excs, self._stmt_list(node.body))
+ def visit_nonlocal(self, node):
+ """return an astng.Nonlocal node as string"""
+ return 'nonlocal %s' % ', '.join(node.names)
+
def visit_raise(self, node):
"""return an astng.Raise node as string"""
if node.exc: