Open snoopyjc opened 2 years ago
Fix in sub control of pythonizer:
gen_chunk($ValPy[$begin]); # gen initial keyword
if( $ValPerl[$begin] eq 'unless' ) { gen_chunk('('); } # issue 20
$k=expression($start,$limit,0); # last bracket was erased.
return -255 if ($k<0);
if( $ValPerl[$begin] eq 'unless' ) { gen_chunk(')'); } # issue 20
gen_chunk(':');
The perl "unless" construct generated an "if not" in python, but it fails to keep the parenthesis so it's probably wrong code:
generates:
but the "not" only applies to the first part of the expression - it needs to be applied to the whole thing.