Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I created an adjusted version of translate which is ASCII-only and
renamed maketrans to makeTrans with some minor changes. Instead of
deprecating the old translate and maketrans, maketrans is now a
deprecated alias of makeTrans, and the new ASCII-only translate should
be compatible with the old one.
The one major change which might break code is that I made it so that
it uses arrays of length 128 rather than 256, since all valid ASCII
characters have a 0 in their most significant bit, making 128 in all
rather than 256. As long as code is using maketrans (as it should be),
that's not an issue, since it'll just automatically use makeTrans, which
uses 128. But if anyone constructed one on their own for some reason, it
would now be the wrong length. I don't consider that to be a high enough
risk to really be a concern though.