mirror of
https://github.com/python/cpython.git
synced 2025-09-29 03:35:31 +00:00
[3.11] gh-94300: Update datetime.strptime documentation (GH-95318) (#103785)
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 5b404d6cad
)
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>
This commit is contained in:
parent
bce93c2d83
commit
410c2ce956
1 changed files with 1 additions and 1 deletions
|
@ -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]))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue