[Python-checkins] gh-94300: Update datetime.strptime documentation (#95318)
pganssle
webhook-mailer at python.org
Mon Apr 24 14:35:23 EDT 2023
https://github.com/python/cpython/commit/5b404d6cad2bf53295fdf96305f95efe1ea0174e
commit: 5b404d6cad2bf53295fdf96305f95efe1ea0174e
branch: main
author: Howie Zhao <howiezhaohr at hotmail.com>
committer: pganssle <1377457+pganssle at users.noreply.github.com>
date: 2023-04-24T12:35:15-06:00
summary:
gh-94300: Update datetime.strptime documentation (#95318)
The new wording better reflects the cases where `datetime.strptime` differs from` time.strptime`.
---------
Co-authored-by: Paul Ganssle <git at m.ganssle.io>
files:
M Doc/library/datetime.rst
diff --git a/Doc/library/datetime.rst b/Doc/library/datetime.rst
index 761f5f04b9b2..ab8fed691e86 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]))
More information about the Python-checkins
mailing list