mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +00:00
gh-117764: Add docstrings and signatures for the __replace__ methods (GH-117768)
This commit is contained in:
parent
deb921f851
commit
6e05537676
4 changed files with 14 additions and 6 deletions
|
@ -219,7 +219,9 @@ namespace_replace(PyObject *self, PyObject *args, PyObject *kwargs)
|
|||
static PyMethodDef namespace_methods[] = {
|
||||
{"__reduce__", (PyCFunction)namespace_reduce, METH_NOARGS,
|
||||
namespace_reduce__doc__},
|
||||
{"__replace__", _PyCFunction_CAST(namespace_replace), METH_VARARGS|METH_KEYWORDS, NULL},
|
||||
{"__replace__", _PyCFunction_CAST(namespace_replace), METH_VARARGS|METH_KEYWORDS,
|
||||
PyDoc_STR("__replace__($self, /, **changes)\n--\n\n"
|
||||
"Return a copy of the namespace object with new values for the specified attributes.")},
|
||||
{NULL, NULL} // sentinel
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue