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/;