Skip to content

Commit

Permalink
[3.11] gh-99032: datetime docs: Encoding is no longer relevant (GH-93365
Browse files Browse the repository at this point in the history
) (#103788)

This removes a section of the `strftime` and `strptime` documentation that refers to a bygone era when `strftime` would return an encoded byte string.

---------

(cherry picked from commit 2aa22f7)

Co-authored-by: William Andrea <william.j.andrea@gmail.com>
Co-authored-by: Paul Ganssle <1377457+pganssle@users.noreply.github.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
  • Loading branch information
4 people authored Apr 29, 2023
1 parent fee3c91 commit 9fbb614
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions Doc/library/datetime.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2502,10 +2502,7 @@ Notes:
Because the format depends on the current locale, care should be taken when
making assumptions about the output value. Field orderings will vary (for
example, "month/day/year" versus "day/month/year"), and the output may
contain Unicode characters encoded using the locale's default encoding (for
example, if the current locale is ``ja_JP``, the default encoding could be
any one of ``eucJP``, ``SJIS``, or ``utf-8``; use :meth:`locale.getlocale`
to determine the current locale's encoding).
contain non-ASCII characters.

(2)
The :meth:`strptime` method can parse years in the full [1, 9999] range, but
Expand Down

0 comments on commit 9fbb614

Please sign in to comment.