Add Python 3.6 setcomp and another call bug

This commit is contained in:
rocky
2018-04-01 07:09:24 -04:00
parent b54be24e14
commit 120412f5a8
7 changed files with 33 additions and 10 deletions

View File

@@ -536,8 +536,10 @@ def make_function3(self, node, is_lambda, nested=1, codeNode=None):
else:
default, kw_args, annotate, closure = args_node.attr
if default:
assert node[0] == 'expr', "expecting mkfunc default node to be an expr"
expr_node = node[0]
if node[0] == 'pos_arg':
expr_node = expr_node[0]
assert expr_node == 'expr', "expecting mkfunc default node to be an expr"
if (expr_node[0] == 'LOAD_CONST' and
isinstance(expr_node[0].attr, tuple)):
defparams = [repr(a) for a in expr_node[0].attr]