softpano / pythonizer

Translator (or more correctly transcriber) from Perl to Python
http://www.softpanorama.org/Scripting/Pythonorama/Python_for_perl_programmers/Pythonizer/index.shtml
Other
39 stars 17 forks source link

"expr or return" generates bad code #93

Open snoopyjc opened 2 years ago

snoopyjc commented 2 years ago

Expression or return; generates bad code. For example:

my @all =`cat /app/files` or return 0;
@allLines = $ftp->ls("myfile.*") or return 0;
snoopyjc commented 2 years ago

Implemented in https://github.com/snoopyjc/pythonizer v0.922.

snoopyjc commented 2 years ago

Found a new case:

my $rel = $release || -1;