Python 3.5 if statments decompyle

Sometimes it doesn't need JUMP_FORWARD _come_from _come_from

For example:

def handle2(module):
    if module == 'foo':
        try:
            module = 1
        except ImportError as exc:
            module = exc

    return module

And:

if __name__:
    for i in (1, 2):
        x = 3
This commit is contained in:
rocky
2016-04-30 03:51:54 -04:00
parent 3e49aa56bb
commit 43f5c5dcca
3 changed files with 1 additions and 0 deletions

View File

@@ -274,6 +274,7 @@ class Python3Parser(PythonParser):
_ifstmts_jump ::= return_if_stmts
_ifstmts_jump ::= c_stmts_opt JUMP_FORWARD _come_from _come_from
_ifstmts_jump ::= c_stmts_opt
iflaststmt ::= testexpr c_stmts_opt JUMP_ABSOLUTE