From eb563509878faba61a21aa7c0039c6314bf3cace Mon Sep 17 00:00:00 2001 From: Emile Anclin Date: Thu, 28 Oct 2010 16:07:24 +0200 Subject: py3k : introduce Nonlocal node --- as_string.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'as_string.py') 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: -- cgit v1.2.1