From e7b62a722f33f00002ff48e71cb3a661bee0c2b9 Mon Sep 17 00:00:00 2001 From: rocky Date: Sun, 10 Jun 2018 16:46:57 -0400 Subject: [PATCH] Fix more Python 3.0 parse bugs --- uncompyle6/parsers/parse30.py | 1 + uncompyle6/semantics/make_function.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/uncompyle6/parsers/parse30.py b/uncompyle6/parsers/parse30.py index ef369566..426daec7 100644 --- a/uncompyle6/parsers/parse30.py +++ b/uncompyle6/parsers/parse30.py @@ -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. diff --git a/uncompyle6/semantics/make_function.py b/uncompyle6/semantics/make_function.py index ccbc606e..bd066b6e 100644 --- a/uncompyle6/semantics/make_function.py +++ b/uncompyle6/semantics/make_function.py @@ -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')):