mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
Patch #1071: Improve unicode.translate() so that you can pass unicode
characters as mapping keys and invalid mapping keys are recognized and raise an error.
This commit is contained in:
parent
3b8cb17695
commit
94c2c75b5e
3 changed files with 52 additions and 6 deletions
|
@ -931,7 +931,7 @@ functions based on regular expressions.
|
|||
Return a copy of the *s* where all characters have been mapped through the
|
||||
*map* which must be a dictionary of characters (strings of length 1) or
|
||||
Unicode ordinals (integers) to Unicode ordinals, strings or ``None``.
|
||||
Unmapped characters are left untouched. Characters mapped to ``None`` are
|
||||
Unmapped characters are left untouched. Characters mapped to ``None`` are
|
||||
deleted.
|
||||
|
||||
.. note::
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue