]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-94300: Update datetime.strptime documentation (#95318)
authorHowie Zhao <howiezhaohr@hotmail.com>
Mon, 24 Apr 2023 18:35:15 +0000 (02:35 +0800)
committerGitHub <noreply@github.com>
Mon, 24 Apr 2023 18:35:15 +0000 (12:35 -0600)
The new wording better reflects the cases where `datetime.strptime` differs from` time.strptime`.

---------

Co-authored-by: Paul Ganssle <git@m.ganssle.io>
Doc/library/datetime.rst

index 761f5f04b9b28802391c05415a3a527837dae262..ab8fed691e86c12f1d1417ece586c23f88a1975f 100644 (file)
@@ -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]))