Bug in Python 3.x genexpr

This commit is contained in:
rocky
2016-05-15 19:28:22 -04:00
parent 2c121545f0
commit 6be6632e96
5 changed files with 15 additions and 5 deletions

View File

@@ -1025,7 +1025,8 @@ class SourceWalker(GenericASTTraversal, object):
def n_genexpr(self, node):
self.write('(')
self.comprehension_walk(node, iter_index=3)
code_index = -6 if self.version > 3.0 else -5
self.comprehension_walk(node, iter_index=3, code_index=code_index)
self.write(')')
self.prune()