Skip to content

Condition on generated code for function() or die() is backwards #12

@snoopyjc

Description

@snoopyjc

Given this perl code:

open(FILE,'<',$file) or die("cannot open $file $!");

The generated python code is calling the die() routine if the open succeeds, instead of fails:

if(FILE:=open(file,'r')):
   sys.exit(f"cannot open {file} {sys.last_value}")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions