mirror of
https://github.com/python/cpython.git
synced 2025-10-05 06:31:48 +00:00
Issue #12164: Document (in docstring) that str.translate accepts None for the first argument.
This commit is contained in:
parent
ffa8e2fb56
commit
cb9bf1ac9c
1 changed files with 3 additions and 1 deletions
|
@ -2173,7 +2173,9 @@ PyDoc_STRVAR(translate__doc__,
|
||||||
Return a copy of the string S, where all characters occurring\n\
|
Return a copy of the string S, where all characters occurring\n\
|
||||||
in the optional argument deletechars are removed, and the\n\
|
in the optional argument deletechars are removed, and the\n\
|
||||||
remaining characters have been mapped through the given\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 *
|
static PyObject *
|
||||||
string_translate(PyStringObject *self, PyObject *args)
|
string_translate(PyStringObject *self, PyObject *args)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue