From d694d2d20cd722afb9184fb122f87cadbdfae0c9 Mon Sep 17 00:00:00 2001 From: F-park <1527093924@qq.com> Date: Sun, 10 Dec 2023 21:37:07 +0800 Subject: [PATCH 1/2] fix error and add doctest marker --- Doc/library/datetime.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Doc/library/datetime.rst b/Doc/library/datetime.rst index 1bab1fb9bd9464..cd9814f8127554 100644 --- a/Doc/library/datetime.rst +++ b/Doc/library/datetime.rst @@ -1798,6 +1798,8 @@ Other constructor: 4. Fractional hours and minutes are not supported. Examples:: + + .. doctest:: >>> from datetime import time >>> time.fromisoformat('04:23:01') @@ -1808,7 +1810,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))) From 6ab2c3271c406f1d7e6c94f5e47ecfa1d12dc0c9 Mon Sep 17 00:00:00 2001 From: F-park <1527093924@qq.com> Date: Sun, 10 Dec 2023 22:12:37 +0800 Subject: [PATCH 2/2] remove whitespace --- Doc/library/datetime.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/datetime.rst b/Doc/library/datetime.rst index cd9814f8127554..ee827dab1dcc19 100644 --- a/Doc/library/datetime.rst +++ b/Doc/library/datetime.rst @@ -1798,7 +1798,7 @@ Other constructor: 4. Fractional hours and minutes are not supported. Examples:: - + .. doctest:: >>> from datetime import time