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
commiteb563509878faba61a21aa7c0039c6314bf3cace (patch)
tree12f3fdec020fa77c12e91fa41d3803a66961c3d3 /as_string.py
parenta7ef0867c87fb7d760baee8cd2b7526f238fe0b1 (diff)
downloadastroid-eb563509878faba61a21aa7c0039c6314bf3cace.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 02a028a..7605111 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: