summaryrefslogtreecommitdiffstats
path: root/Modules/_datetimemodule.c
diff options
context:
space:
mode:
authorRam Rachum <ram@rachum.com>2020-10-03 10:43:47 (GMT)
committerGitHub <noreply@github.com>2020-10-03 10:43:47 (GMT)
commit52301312bb9de2299b0c42468fd1936d869e651c (patch)
tree1815a0569beccc2e1f7945f045201e6ab10d2d8a /Modules/_datetimemodule.c
parentf97e42ef4d97dee64f45ed65170a6e77c8e46fdf (diff)
downloadcpython-52301312bb9de2299b0c42468fd1936d869e651c.zip
cpython-52301312bb9de2299b0c42468fd1936d869e651c.tar.gz
cpython-52301312bb9de2299b0c42468fd1936d869e651c.tar.bz2
bpo-41867: List options for timespec in docstrings of isoformat methods (GH-22418)
Diffstat (limited to 'Modules/_datetimemodule.c')
-rw-r--r--Modules/_datetimemodule.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/Modules/_datetimemodule.c b/Modules/_datetimemodule.c
index 0631272..9486871 100644
--- a/Modules/_datetimemodule.c
+++ b/Modules/_datetimemodule.c
@@ -4663,7 +4663,10 @@ static PyMethodDef time_methods[] = {
{"isoformat", (PyCFunction)(void(*)(void))time_isoformat, METH_VARARGS | METH_KEYWORDS,
PyDoc_STR("Return string in ISO 8601 format, [HH[:MM[:SS[.mmm[uuu]]]]]"
"[+HH:MM].\n\n"
- "timespec specifies what components of the time to include.\n")},
+ "The optional argument timespec specifies the number "
+ "of additional terms\nof the time to include. Valid "
+ "options are 'auto', 'hours', 'minutes',\n'seconds', "
+ "'milliseconds' and 'microseconds'.\n")},
{"strftime", (PyCFunction)(void(*)(void))time_strftime, METH_VARARGS | METH_KEYWORDS,
PyDoc_STR("format -> strftime() style string.")},
@@ -6370,9 +6373,10 @@ static PyMethodDef datetime_methods[] = {
"YYYY-MM-DDT[HH[:MM[:SS[.mmm[uuu]]]]][+HH:MM].\n"
"sep is used to separate the year from the time, and "
"defaults to 'T'.\n"
- "timespec specifies what components of the time to include"
- " (allowed values are 'auto', 'hours', 'minutes', 'seconds',"
- " 'milliseconds', and 'microseconds').\n")},
+ "The optional argument timespec specifies the number "
+ "of additional terms\nof the time to include. Valid "
+ "options are 'auto', 'hours', 'minutes',\n'seconds', "
+ "'milliseconds' and 'microseconds'.\n")},
{"utcoffset", (PyCFunction)datetime_utcoffset, METH_NOARGS,
PyDoc_STR("Return self.tzinfo.utcoffset(self).")},