You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I mocked a very simple code block with there if statements. The decompiled result if different from the original code.
How to Reproduce
The original python code.
deffoo(a, b, c):
ifa:
a=1ifb:
b=2ifc:
c=3
Generate .pyc with following command. python3 -m py_compile test_uncompy.py
The decompile with uncompy;e6. uncompyle6 -o ./__pycache__ ./__pycache__/test_uncompy.cpython-36.pyc
The output code is :
# uncompyle6 version 3.9.3.dev0# Python bytecode version base 3.6 (3379)# Decompiled from: Python 3.6.9 (default, Mar 10 2023, 16:46:00) # [GCC 8.4.0]# Embedded file name: test_uncompy.py# Compiled at: 2024-11-13 18:46:46# Size of source mod 2**32: 89 bytesdeffoo(a, b, c):
ifa:
a=1else:
ifb:
b=2ifc:
c=3
If there were more than two if statements than the result is not correct. Please have a look at this issue, thanks very much.
Output Given
# uncompyle6 version 3.9.3.dev0# Python bytecode version base 3.6 (3379)# Decompiled from: Python 3.6.9 (default, Mar 10 2023, 16:46:00) # [GCC 8.4.0]# Embedded file name: test_uncompy.py# Compiled at: 2024-11-13 18:46:46# Size of source mod 2**32: 89 bytesdeffoo(a, b, c):
ifa:
a=1else:
ifb:
b=2ifc:
c=3
Expected behavior
# uncompyle6 version 3.9.3.dev0# Python bytecode version base 3.6 (3379)# Decompiled from: Python 3.6.9 (default, Mar 10 2023, 16:46:00) # [GCC 8.4.0]# Embedded file name: test_uncompy.py# Compiled at: 2024-11-13 18:46:46# Size of source mod 2**32: 89 bytesdeffoo(a, b, c):
ifa:
a=1ifb:
b=2ifc:
c=3
Environment
uncompyle6, version 3.9.3.dev0
pydisasm, version 6.1.0
python 3.6.13 |Anaconda, Inc.| (default, Jun 4 2021, 14:25:59)
6.5.0-14-generic #14~22.04.1-Ubuntu
Workarounds
Priority
Additional Context
The text was updated successfully, but these errors were encountered:
Description
I mocked a very simple code block with there if statements. The decompiled result if different from the original code.
How to Reproduce
The original python code.
Generate .pyc with following command.
python3 -m py_compile test_uncompy.py
The decompile with uncompy;e6.
uncompyle6 -o ./__pycache__ ./__pycache__/test_uncompy.cpython-36.pyc
The output code is :
If there were more than two if statements than the result is not correct. Please have a look at this issue, thanks very much.
Output Given
Expected behavior
Environment
Workarounds
Priority
Additional Context
The text was updated successfully, but these errors were encountered: