diff options
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): |