summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorZachary Ware <zachary.ware@gmail.com>2015-08-06 05:05:13 (GMT)
committerZachary Ware <zachary.ware@gmail.com>2015-08-06 05:05:13 (GMT)
commit070bd62cfa144bfa62ec7766a936d9c7b360861b (patch)
tree813ab1a48c6454f860357abbe38cf9422a04e3af /Objects
parentc7c66c91427734dcdb34ae78eee2431e92fa6f07 (diff)
parentd987a81d29a16215fff6dd9670cedbcdac82d1b0 (diff)
downloadcpython-070bd62cfa144bfa62ec7766a936d9c7b360861b.zip
cpython-070bd62cfa144bfa62ec7766a936d9c7b360861b.tar.gz
cpython-070bd62cfa144bfa62ec7766a936d9c7b360861b.tar.bz2
Closes #21279: Merge with 3.5
Diffstat (limited to 'Objects')
-rw-r--r--Objects/unicodeobject.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 796e0b4..0709789 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -13038,11 +13038,12 @@ unicode_maketrans_impl(PyObject *x, PyObject *y, PyObject *z)
PyDoc_STRVAR(translate__doc__,
"S.translate(table) -> str\n\
\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, strings, or None.\n\
-Unmapped characters are left untouched. Characters mapped to None\n\
-are deleted.");
+Return a copy of the string S in which each character has been mapped\n\
+through the given translation table. The table must implement\n\
+lookup/indexing via __getitem__, for instance a dictionary or list,\n\
+mapping Unicode ordinals to Unicode ordinals, strings, or None. If\n\
+this operation raises LookupError, the character is left untouched.\n\
+Characters mapped to None are deleted.");
static PyObject*
unicode_translate(PyObject *self, PyObject *table)