Fix bug in Python 3 lambda expression handling

Some other small cleanup changes
This commit is contained in:
rocky
2016-05-15 18:14:22 -04:00
parent bb31629c35
commit 2c121545f0
6 changed files with 27 additions and 8 deletions

View File

@@ -1605,7 +1605,10 @@ class SourceWalker(GenericASTTraversal, object):
pos_args = args_node.attr
pass
code = node[code_index].attr
if self.version > 3.0 and isLambda and iscode(node[-3].attr):
code = node[-3].attr
else:
code = node[code_index].attr
assert iscode(code)
code = Code(code, self.scanner, self.currentclass)