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

tr with d flag generates bad code if there is a replacement string #122

Open snoopyjc opened 2 years ago

snoopyjc commented 2 years ago

tr with d flag generates bad code if there is a replacement string. It only generates correct code if the replacement string is empty. For example:

tr/ac/b/d;

should map a->b and delete all 'c' characters.

snoopyjc commented 2 years ago

Fixed in my v0.956 https://github.com/snoopyjc/pythonizer/