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 ranges need to be expanded for maketrans #121

Open snoopyjc opened 2 years ago

snoopyjc commented 2 years ago

tr ranges need to be expanded for maketrans. The python maketrans call doesn't accept ranges, so wrong code is generated for like:

tr/a-z/A-Z/;
snoopyjc commented 2 years ago

Also the length of the strings in the 2 args to maketrans must be the same.

snoopyjc commented 2 years ago

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