diff options
author | Emile Anclin <emile.anclin@logilab.fr> | 2010-12-09 17:17:10 +0100 |
---|---|---|
committer | Emile Anclin <emile.anclin@logilab.fr> | 2010-12-09 17:17:10 +0100 |
commit | 5d3f2a5255224c15c316d0854fd9db2b41a201a0 (patch) | |
tree | 1c261dcb45e7a581babd8f40b36b6ddbdcdf4a8f /as_string.py | |
parent | 24c1fb27e7cc025748e2e8406939c5bff82f13b0 (diff) | |
download | astroid-git-5d3f2a5255224c15c316d0854fd9db2b41a201a0.tar.gz |
test assignement to True and yield; fix yield as_string
Diffstat (limited to 'as_string.py')
-rw-r--r-- | as_string.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/as_string.py b/as_string.py index 62ab5e84..3eeda096 100644 --- a/as_string.py +++ b/as_string.py @@ -395,7 +395,8 @@ class AsStringVisitor(object): def visit_yield(self, node): """yield an ast.Yield node as string""" - return 'yield %s' % node.value.accept(self) + yi_val = node.value and (" " + node.value.accept(self)) or "" + return 'yield' + yi_val class AsStringVisitor3k(AsStringVisitor): |