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

Variable references in interpolated strings with ${var} generate bad code #43

Open snoopyjc opened 2 years ago

snoopyjc commented 2 years ago

Variable references in interpolated strings with ${var} generate bad code. For example:

$tmdate = "${year}_${month}_${day}";

produces:

tmdate=f"{[year]}_{[month]}_{[day]}"

instead of:

tmdate=f"{year}_{month}_{day}"
snoopyjc commented 2 years ago

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