python-uncompyle6
python-uncompyle6 copied to clipboard
Problem with assert testing two ranges
Description
Fails after an assert with and of two (a<= b <c) type conditions with message Parse error at or near `CALL_METHOD_1' instruction at offset 60
How to Reproduce
I've attached a zip with the source, code and output
Source test.py
#! python3
def bug(cfg, dst, src):
assert (0 <= dst <= cfg.WIDTH and
0 <= src <= cfg.WIDTH);
cfg.trace("hello bug");
Expected behavior
Well - that it wouldn't give a parse error but sonething reasonably similar to the input!
Environment
uncompyle6 3.7.0 python 3.8.3 on Windows 10
Additional Environment or Context
This has been addressed over in the decompyle3 project which reorganizes the grammar to better handle things like this.
I will leave so someone else to back port it here. The commit should give some sense of what needs to happen.
Thanks very much. I'm impressed by how well it works as I'd used quite a few of the later facilities. Cheers, David
On 31/05/2020 23:00, R. Bernstein wrote:
This has been addressed over in the decompyle3 project which reorganizes the grammar to better handle things like this.
I will leave so someone else to back port it here. The commit should give some sense of what needs to happen.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rocky/python-uncompyle6/issues/317#issuecomment-636536640, or unsubscribe https://github.com/notifications/unsubscribe-auth/APZGFVZUCEA2NZXRG7R2NGLRULHQXANCNFSM4NPICZ5Q.