gh-117764: Add docstrings and signatures for the __replace__ methods (GH-117768)

This commit is contained in:
Serhiy Storchaka 2024-04-12 11:46:20 +03:00 committed by GitHub
parent deb921f851
commit 6e05537676
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 14 additions and 6 deletions

View file

@ -453,7 +453,9 @@ error:
static PyMethodDef structseq_methods[] = {
{"__reduce__", (PyCFunction)structseq_reduce, METH_NOARGS, NULL},
{"__replace__", _PyCFunction_CAST(structseq_replace), METH_VARARGS | METH_KEYWORDS, NULL},
{"__replace__", _PyCFunction_CAST(structseq_replace), METH_VARARGS | METH_KEYWORDS,
PyDoc_STR("__replace__($self, /, **changes)\n--\n\n"
"Return a copy of the structure with new values for the specified fields.")},
{NULL, NULL} // sentinel
};