]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] gh-94300: Update datetime.strptime documentation (GH-95318) (#103785)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 26 Apr 2023 20:55:39 +0000 (13:55 -0700)
committerGitHub <noreply@github.com>
Wed, 26 Apr 2023 20:55:39 +0000 (14:55 -0600)
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 <howiezhaohr@hotmail.com>
Co-authored-by: Paul Ganssle <git@m.ganssle.io>
Co-authored-by: Ɓukasz Langa <lukasz@langa.pl>
Co-authored-by: Alexander Belopolsky <abalkin@users.noreply.github.com>
Doc/library/datetime.rst

index d46eaade142e47cadf8c47825a73a916abea8869..df02b68db253f83331ff5552a88c5739eccfa032 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]))