diff --git a/uncompyle6/parsers/parse3.py b/uncompyle6/parsers/parse3.py index d5cbb7c5..3788a738 100644 --- a/uncompyle6/parsers/parse3.py +++ b/uncompyle6/parsers/parse3.py @@ -338,10 +338,8 @@ class Python3Parser(PythonParser): whileelsestmt ::= SETUP_LOOP testexpr l_stmts_opt JUMP_BACK POP_BLOCK else_suite COME_FROM_LOOP - # FIXME: This gets confused with if/else in a loop. But while/else in Python - # is probably pretty rare. while1elsestmt ::= SETUP_LOOP l_stmts JUMP_BACK - else_suite COME_FROM_LOOP + else_suite whileelselaststmt ::= SETUP_LOOP testexpr l_stmts_opt JUMP_BACK POP_BLOCK else_suitec COME_FROM_LOOP diff --git a/uncompyle6/parsers/parse30.py b/uncompyle6/parsers/parse30.py index c492d8e2..f02f686b 100644 --- a/uncompyle6/parsers/parse30.py +++ b/uncompyle6/parsers/parse30.py @@ -26,8 +26,6 @@ class Python30Parser(Python3Parser): # Used to keep index order the same in semantic actions jb_pop_top ::= JUMP_BACK POP_TOP - # FIXME: Add COME_FROM designators - # This gets confused with while1elsestmt. But this is probably more common while1stmt ::= SETUP_LOOP l_stmts COME_FROM_LOOP else_suitel ::= l_stmts COME_FROM_LOOP JUMP_BACK diff --git a/uncompyle6/semantics/make_function.py b/uncompyle6/semantics/make_function.py index 6cdde29c..933c248d 100644 --- a/uncompyle6/semantics/make_function.py +++ b/uncompyle6/semantics/make_function.py @@ -542,7 +542,7 @@ def make_function3(self, node, isLambda, nested=1, codeNode=None): if len(code.co_consts) > 0 and code.co_consts[0] is not None and not isLambda: # ugly # docstring exists, dump it - self.print_docstring(indent, code.co_consts[0]) + self.print_docstring(self.indent, code.co_consts[0]) code._tokens = None # save memory assert ast == 'stmts'