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

Regex with local sub call generates bad code #99

Open snoopyjc opened 2 years ago

snoopyjc commented 2 years ago

Regex with local sub call generates bad code. For example:

next if exists $cl{$k} and strip($fac) =~ /^OC/;

Generates:

if k in cl and strip([fac])re.search(r'^OC',:
snoopyjc commented 2 years ago

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