summaryrefslogtreecommitdiffstats
path: root/Lib/datetime.py
diff options
context:
space:
mode:
authorMiss Skeleton (bot) <31488909+miss-islington@users.noreply.github.com>2020-10-03 11:42:16 (GMT)
committerGitHub <noreply@github.com>2020-10-03 11:42:16 (GMT)
commit8ca08310a882b7db6469fe732465610b92f4665e (patch)
tree30088de71d7a302e9b0e7e8d56abba523b316edd /Lib/datetime.py
parentef7b937b8fe94f4c59dfcbe7567c3ca76097a41d (diff)
downloadcpython-8ca08310a882b7db6469fe732465610b92f4665e.zip
cpython-8ca08310a882b7db6469fe732465610b92f4665e.tar.gz
cpython-8ca08310a882b7db6469fe732465610b92f4665e.tar.bz2
[3.9] bpo-41867: List options for timespec in docstrings of isoformat methods (GH-22418)
(cherry picked from commit 52301312bb9de2299b0c42468fd1936d869e651c) Co-authored-by: Ram Rachum <ram@rachum.com>
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 952aebf..2294ac2 100644
--- a/Lib/datetime.py
+++ b/Lib/datetime.py
@@ -1452,7 +1452,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)
@@ -1937,7 +1938,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,