[3.12] gh-112925: Fix error in example of datetime.time.fromisoformat and add doctest marker (GH-112931) (GH-113427)

(cherry picked from commit bdc8d667ab)

Co-authored-by: F-park <52167622+F-park@users.noreply.github.com>
This commit is contained in:
Miss Islington (bot) 2023-12-23 11:50:00 +01:00 committed by GitHub
parent c7874bb56f
commit fee2bc15f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1793,6 +1793,8 @@ Other constructor:
Examples::
.. doctest::
>>> from datetime import time
>>> time.fromisoformat('04:23:01')
datetime.time(4, 23, 1)
@ -1802,7 +1804,7 @@ Other constructor:
datetime.time(4, 23, 1)
>>> time.fromisoformat('04:23:01.000384')
datetime.time(4, 23, 1, 384)
>>> time.fromisoformat('04:23:01,000')
>>> time.fromisoformat('04:23:01,000384')
datetime.time(4, 23, 1, 384)
>>> time.fromisoformat('04:23:01+04:00')
datetime.time(4, 23, 1, tzinfo=datetime.timezone(datetime.timedelta(seconds=14400)))