[3.9] bpo-41867: List options for timespec in docstrings of isoformat methods (GH-22418)

(cherry picked from commit 52301312bb)

Co-authored-by: Ram Rachum <ram@rachum.com>
This commit is contained in:
Miss Skeleton (bot) 2020-10-03 04:42:16 -07:00 committed by Łukasz Langa
parent 5533c4952c
commit faaa303922
No known key found for this signature in database
GPG key ID: B26995E310250568
2 changed files with 12 additions and 6 deletions

View file

@ -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,