Kaydet (Commit) cb9bf1ac authored tarafından Mark Dickinson's avatar Mark Dickinson

Issue #12164: Document (in docstring) that str.translate accepts None for the first argument.

üst ffa8e2fb
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment