pythonizer icon indicating copy to clipboard operation
pythonizer copied to clipboard

shift generates bad code when used to grab sub args

Open snoopyjc opened this issue 3 years ago • 1 comments

Given this code:

sub issue_8
{
    $arg1 = shift;
    my $arg2 = shift;
}

The code generated for "$arg1 = shift;" is "arg1=.pop(0)", which is a syntax error in python. Same for $arg2.

snoopyjc avatar Nov 06 '21 22:11 snoopyjc

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

snoopyjc avatar Feb 07 '22 16:02 snoopyjc