pythonizer
pythonizer copied to clipboard
Escaped interpolation symbols in "..." generate incorrect python code
Escaped interpolation symbols in "..." generate incorrect python code. Also, symbols {
and }
need to be escaped (by doubling them) in python f"..."
strings. For example:
print "three=i\@{3}\$\n";
print "three=i{3}$i\n";
Generates:
print(f"three=i\@{3}\$")
print(f"three=i{3}{i}")
Instead of:
print("three=i@{3}$")
print(f"three=i{{3}}{i}")
Fixed in https://github.com/snoopyjc/pythonizer