pythonizer icon indicating copy to clipboard operation
pythonizer copied to clipboard

Assignments in expressions with complicated LHS produces incorrect code

Open snoopyjc opened this issue 3 years ago • 2 comments

Perl assignments in expressions allows arbitrary LHS, while python only allows a single variable, so things like:

if(($year, $month, $day) = @ymd) { ... }

or

if($arr[0] = $i) { ... }

generate incorrect code.

snoopyjc avatar Nov 21 '21 02:11 snoopyjc

LOL I fixed these but found a similar one in an elsif!

snoopyjc avatar Dec 14 '21 17:12 snoopyjc

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

snoopyjc avatar Feb 07 '22 16:02 snoopyjc