-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
During testing with python3.11 it showed a common bug:
- when an
if-statementis followed by areturnstatement ON THE SAME LINE - then the
returnstatement moves to the end of the enclosing block of theif-statement
or more graphic:
if x == 1: return 1
if x == 2: return 2
with ast.unparse() making it
if x == 1: pass
if x == 2: pass
return 1
return 2
Workaround - put the return statement on a seperate line in the input python sources.
Metadata
Metadata
Assignees
Labels
No labels