mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +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
|
@ -3645,7 +3645,8 @@ static PyMethodDef date_methods[] = {
|
|||
|
||||
DATETIME_DATE_REPLACE_METHODDEF
|
||||
|
||||
{"__replace__", _PyCFunction_CAST(datetime_date_replace), METH_FASTCALL | METH_KEYWORDS},
|
||||
{"__replace__", _PyCFunction_CAST(datetime_date_replace), METH_FASTCALL | METH_KEYWORDS,
|
||||
PyDoc_STR("__replace__($self, /, **changes)\n--\n\nThe same as replace().")},
|
||||
|
||||
{"__reduce__", (PyCFunction)date_reduce, METH_NOARGS,
|
||||
PyDoc_STR("__reduce__() -> (cls, state)")},
|
||||
|
@ -4772,7 +4773,8 @@ static PyMethodDef time_methods[] = {
|
|||
|
||||
DATETIME_TIME_REPLACE_METHODDEF
|
||||
|
||||
{"__replace__", _PyCFunction_CAST(datetime_time_replace), METH_FASTCALL | METH_KEYWORDS},
|
||||
{"__replace__", _PyCFunction_CAST(datetime_time_replace), METH_FASTCALL | METH_KEYWORDS,
|
||||
PyDoc_STR("__replace__($self, /, **changes)\n--\n\nThe same as replace().")},
|
||||
|
||||
{"fromisoformat", (PyCFunction)time_fromisoformat, METH_O | METH_CLASS,
|
||||
PyDoc_STR("string -> time from a string in ISO 8601 format")},
|
||||
|
@ -6619,7 +6621,8 @@ static PyMethodDef datetime_methods[] = {
|
|||
|
||||
DATETIME_DATETIME_REPLACE_METHODDEF
|
||||
|
||||
{"__replace__", _PyCFunction_CAST(datetime_datetime_replace), METH_FASTCALL | METH_KEYWORDS},
|
||||
{"__replace__", _PyCFunction_CAST(datetime_datetime_replace), METH_FASTCALL | METH_KEYWORDS,
|
||||
PyDoc_STR("__replace__($self, /, **changes)\n--\n\nThe same as replace().")},
|
||||
|
||||
{"astimezone", _PyCFunction_CAST(datetime_astimezone), METH_VARARGS | METH_KEYWORDS,
|
||||
PyDoc_STR("tz -> convert to local time in new timezone tz\n")},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue