]> granicus.if.org Git - python/commitdiff
Issue #12164: Document (in docstring) that str.translate accepts None for the first...
authorMark Dickinson <mdickinson@enthought.com>
Sat, 25 Jun 2011 09:00:12 +0000 (11:00 +0200)
committerMark Dickinson <mdickinson@enthought.com>
Sat, 25 Jun 2011 09:00:12 +0000 (11:00 +0200)
Objects/stringobject.c

index 693f7733d9041560cb826f24e5cef337a2b41390..b3b79b8d59e815feed37f46883f0c82a22268315 100644 (file)
@@ -2173,7 +2173,9 @@ PyDoc_STRVAR(translate__doc__,
 Return a copy of the string S, where all characters occurring\n\
 in the optional argument deletechars are removed, and the\n\
 remaining characters have been mapped through the given\n\
-translation table, which must be a string of length 256.");
+translation table, which must be a string of length 256 or None.\n\
+If the table argument is None, no translation is applied and\n\
+the operation simply removes the characters in deletechars.");
 
 static PyObject *
 string_translate(PyStringObject *self, PyObject *args)