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

A return statement with a || expression generates bad code #110

Open snoopyjc opened 2 years ago

snoopyjc commented 2 years ago

A return statement with a || expression generates bad code. For example:

sub IS_A_NUMBER {
   return ($_[0] =~ /^(\+|-)?([0-9]|\.)+$/) || 0 ;
}
snoopyjc commented 2 years ago

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