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 inside subscript generates bad code #90

Open snoopyjc opened 2 years ago

snoopyjc commented 2 years ago

Regex inside subscript generates bad code. For example:

$interfaces{$key}{vrf} = $line[($dir =~ /agnip$/) ? 21:24];

tries to apply the regex to $line instead of $dir.

snoopyjc commented 2 years ago

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