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

Matching using a string as a regex produces a #FAILTRAN #106

Open snoopyjc opened 2 years ago

snoopyjc commented 2 years ago

Matching using a string as a regex produces a #FAILTRAN. For example:

 if($browser =~ "IE") {...}
snoopyjc commented 2 years ago

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

Generates if "IE" in browser:

snoopyjc commented 2 years ago

Additional fix in 0.933 to handle arbitrary expression instead of the string on the RHS of the =~.