pythonizer icon indicating copy to clipboard operation
pythonizer copied to clipboard

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

Open snoopyjc opened this issue 3 years ago • 1 comments

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 avatar Nov 16 '21 02:11 snoopyjc

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

snoopyjc avatar Feb 07 '22 16:02 snoopyjc