mirror of
https://github.com/python/cpython.git
synced 2025-07-12 05:45:15 +00:00
Change the unicode.translate docstring to document that
Unicode strings (with arbitrary length) are allowed as entries in the unicode.translate mapping. Add a test case for multicharacter replacements. (Multicharacter replacements were enabled by the PEP 293 patch)
This commit is contained in:
parent
a04c3d86ae
commit
5c1ee17742
2 changed files with 5 additions and 2 deletions
|
@ -5610,8 +5610,9 @@ PyDoc_STRVAR(translate__doc__,
|
|||
\n\
|
||||
Return a copy of the string S, where all characters have been mapped\n\
|
||||
through the given translation table, which must be a mapping of\n\
|
||||
Unicode ordinals to Unicode ordinals or None. Unmapped characters\n\
|
||||
are left untouched. Characters mapped to None are deleted.");
|
||||
Unicode ordinals to Unicode ordinals, Unicode strings or None.\n\
|
||||
Unmapped characters are left untouched. Characters mapped to None\n\
|
||||
are deleted.");
|
||||
|
||||
static PyObject*
|
||||
unicode_translate(PyUnicodeObject *self, PyObject *table)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue