We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error of "if if else" expr sequence
here is the source code test.py:
test.py
a = 1 b = 1 if a: print("a") if b: print("b") else: print("else")
then compile it with:
python3 -m compileall -b test.py
and decompile it
uncompyle6 test.pyc >test_dec.py
the output is:
a = 1 b = 1 if a: print('a') elif b: print('b') else: print('else')
the decompiled code is quite different from the origin code if run the code, it will print:
$ python3 test.py a b $ python3 test_dec.py a
expected decompiled code may look like this:
this bug can be repeated in such environments:
Ubuntu 20.04 Python 3.8.5 (default, May 27 2021, 13:30:53) [GCC 9.3.0] on linux uncompyle6 3.7.4 from pip
or
Ubuntu 18.04 Python 3.6.9 (default, Jan 26 2021, 15:33:00) [GCC 8.4.0] uncompyle6 3.7.4 from pip
This bug does not exist in decompile3, but decompile3 cannot handler python3.6 bytecode.
The text was updated successfully, but these errors were encountered:
Please look at the information in https://github.com/rocky/python-uncompyle6/issues/new?&template=bug-report.md especially the "Environment" sections. Also, have looked to see if this has been reported before?
Sorry, something went wrong.
I've updated the bug-report. Sorry for the inconvenience. I've looked through all opened issues and have not seen other reports.
No branches or pull requests
Description
Error of "if if else" expr sequence
How to Reproduce
here is the source code
test.py
:then compile it with:
and decompile it
the output is:
the decompiled code is quite different from the origin code
if run the code, it will print:
Expected behavior
expected decompiled code may look like this:
Environment
this bug can be repeated in such environments:
or
Additional Environment or Context
This bug does not exist in decompile3, but decompile3 cannot handler python3.6 bytecode.
The text was updated successfully, but these errors were encountered: