From 2481ebcb26e03222a13a97bcf55cbc316fd8b408 Mon Sep 17 00:00:00 2001 From: Howie Zhao Date: Tue, 25 Apr 2023 02:35:15 +0800 Subject: [PATCH] gh-94300: Update datetime.strptime documentation (GH-95318) The new wording better reflects the cases where `datetime.strptime` differs from` time.strptime`. --------- (cherry picked from commit 5b404d6cad2bf53295fdf96305f95efe1ea0174e) Co-authored-by: Howie Zhao Co-authored-by: Paul Ganssle --- 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 d46eaade142e47..df02b68db253f8 100644 --- a/Doc/library/datetime.rst +++ b/Doc/library/datetime.rst @@ -1043,7 +1043,7 @@ Other constructors, all class methods: Return a :class:`.datetime` corresponding to *date_string*, parsed according to *format*. - This is equivalent to:: + If *format* does not contain microseconds or timezone information, this is equivalent to:: datetime(*(time.strptime(date_string, format)[0:6]))