From 52301312bb9de2299b0c42468fd1936d869e651c Mon Sep 17 00:00:00 2001 From: Ram Rachum Date: Sat, 3 Oct 2020 13:43:47 +0300 Subject: bpo-41867: List options for timespec in docstrings of isoformat methods (GH-22418) --- Lib/datetime.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Lib/datetime.py') diff --git a/Lib/datetime.py b/Lib/datetime.py index 3090978508..ea86bcb8b2 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, -- cgit v1.2.1