summaryrefslogtreecommitdiffstats
path: root/Lib/datetime.py
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 /Lib/datetime.py
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 'Lib/datetime.py')
-rw-r--r--Lib/datetime.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/datetime.py b/Lib/datetime.py
index 3090978..ea86bcb 100644
--- a/Lib/datetime.py
+++ b/Lib/datetime.py
@@ -1421,7 +1421,8 @@ class time:
part is omitted if self.microsecond == 0.
The optional argument timespec specifies the number of additional
- terms of the time to include.
+ terms of the time to include. Valid options are 'auto', 'hours',
+ 'minutes', 'seconds', 'milliseconds' and 'microseconds'.
"""
s = _format_time(self._hour, self._minute, self._second,
self._microsecond, timespec)
@@ -1906,7 +1907,8 @@ class datetime(date):
time, default 'T'.
The optional argument timespec specifies the number of additional
- terms of the time to include.
+ terms of the time to include. Valid options are 'auto', 'hours',
+ 'minutes', 'seconds', 'milliseconds' and 'microseconds'.
"""
s = ("%04d-%02d-%02d%c" % (self._year, self._month, self._day, sep) +
_format_time(self._hour, self._minute, self._second,