Skip to content

Control flow mis-decompile on python 2.7 #151

Closed
@wangym5106

Description

@wangym5106

Python bytecode version: 2.7, compiled with 2.7.10
uncompyle6 71e7120 on Python 3.6.4

original code:

def func(a, b, c):
    while a:
        if b:
            continue
        return False
    return True

uncompyle6 output:

def func(a, b, c):
    while 1:
        if a:
            if b:
                pass
            continue
        return False

    return True

The output has different behavior compared to original code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Control FlowProblem has to do with bad control-flow detectionPython 2.7

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions