Fix more Python 3.0 parse bugs

This commit is contained in:
rocky
2018-06-10 16:46:57 -04:00
parent 92d63ac598
commit e7b62a722f
2 changed files with 2 additions and 1 deletions

View File

@@ -57,6 +57,7 @@ class Python30Parser(Python31Parser):
comp_iter ::= expr expr LIST_APPEND
jump_forward_else ::= JUMP_FORWARD POP_TOP
jump_absolute_else ::= JUMP_ABSOLUTE POP_TOP
# In many ways 3.0 is like 2.6. The below rules in fact are the same or similar.

View File

@@ -523,7 +523,7 @@ def make_function3(self, node, is_lambda, nested=1, code_node=None):
lc_index = -3
pass
if (3.1 <= self.version <= 3.3 and len(node) > 2 and
if (3.0 <= self.version <= 3.3 and len(node) > 2 and
node[lambda_index] != 'LOAD_LAMBDA' and
(have_kwargs or node[lc_index].kind != 'load_closure')):