pythonizer icon indicating copy to clipboard operation
pythonizer copied to clipboard

tr ranges need to be expanded for maketrans

Open snoopyjc opened this issue 3 years ago • 2 comments

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 avatar Feb 22 '22 15:02 snoopyjc

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

snoopyjc avatar Feb 22 '22 15:02 snoopyjc

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

snoopyjc avatar Mar 31 '22 22:03 snoopyjc