pythonizer icon indicating copy to clipboard operation
pythonizer copied to clipboard

Subexpression parens are missing on postfix control

Open snoopyjc opened this issue 3 years ago • 1 comments

Subexpression parens are missing on postfix control when subexpression begins with a paren. For example:

  print "found snmp data for hour $hour\n" 
     if (-f "$cttdir/bytes.$hour" or -f "$cttdir/bytes.$hour.Z")
        and $options{debug};

The '(' fools the translator into not surrounding the if with parens, so the last paren-like item is eliminated in the generated code.

snoopyjc avatar Nov 08 '21 04:11 snoopyjc

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

snoopyjc avatar Feb 07 '22 16:02 snoopyjc