diff options
author | Walter Dörwald <walter@livinglogic.de> | 2002-09-04 20:31:32 (GMT) |
---|---|---|
committer | Walter Dörwald <walter@livinglogic.de> | 2002-09-04 20:31:32 (GMT) |
commit | 5c1ee17742f21cd819519c4835eb6a958902cdb0 (patch) | |
tree | c9a40ff854bb16a300f9790c3659584949ed4f29 /Objects | |
parent | a04c3d86ae4a31aa17ebca2ec12bbd1066771b88 (diff) | |
download | cpython-5c1ee17742f21cd819519c4835eb6a958902cdb0.zip cpython-5c1ee17742f21cd819519c4835eb6a958902cdb0.tar.gz cpython-5c1ee17742f21cd819519c4835eb6a958902cdb0.tar.bz2 |
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)
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/unicodeobject.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 2108d94..dab3a75 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -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) |