pythonizer icon indicating copy to clipboard operation
pythonizer copied to clipboard

Missing variable in generated python from compound conditional

Open snoopyjc opened this issue 3 years ago • 2 comments

In this statement, the "prev_state" variable is omitted from the generated code:

$bool = $state_chg && ($prev_state == $ST_GLOBAL);

snoopyjc avatar Nov 07 '21 23:11 snoopyjc

Fix in sub expression (pythonizer):

# issue 15 $cur_pos=expression($cur_pos+1,$end_pos,0); # preserve brackets
$cur_pos=expression($cur_pos+1,$limit,0); # preserve brackets	# issue 15

snoopyjc avatar Nov 07 '21 23:11 snoopyjc

Fixed in https://github.com/snoopyjc/pythonizer

snoopyjc avatar Feb 07 '22 16:02 snoopyjc