New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"".translate() docs should mention string.maketrans() #44211
Comments
The translate() documentation at maketrans also mentions "regex.compile" - that should re.compile should mention maketrans as well. |
"re.compile should mention maketrans as well" why? |
The maketrans doc says: I don't have any use case for how it's useful to regex.compile. Maybe there is none, and the mention can be removed. |
Aha. The regex documentation says: compile (pattern[, translate]) /.../ The optional argument translate, if present, must be a 256-character string indicating how characters (both of the pattern and of the strings to be matched) are translated before comparing them; the i-th element of the string gives the translation for the character with ASCII code i. This can be used to implement case-insensitive matching; see the casefold data item below. which means that it was indeed useful for regex.compile. afaik, re.compile doesn't support arbitrary mappings, so that reference should be removed. |
Cleared up both items in rev. 52951, 52952 (2.5). |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: