Skip to content

Problem with assert testing two ranges #317

Open
@dmcqfano

Description

@dmcqfano

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

test.zip

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Boolean ExpressionsComplex boolean expresions with "and", "or", and chained comparisons,Control FlowProblem has to do with bad control-flow detectionPython 3.7Python 3.8Volunteer wantedVolunteer wanted to fix if a bug or to implement if a new feature.Works on decompyle3

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions