Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Improve docstring
  • Loading branch information
zuo committed Sep 30, 2024
commit b42783cb541de081740a8f8d1fc47a98c107f2a6
8 changes: 4 additions & 4 deletions Lib/_strptime.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,11 @@ def __pattern_with_lax_year(self, format):
and platforms (e.g., 'C.UTF-8' on Linux), formatting with either
%c or %x may produce a year number representation that is shorter
than the usual four or two digits, if the number is small enough
(e.g., '999' instead of `0999', or '9' instead of '09').
(e.g., '999' rather than `0999', or '9' rather than of '09').

Note that this helper is *not* used to prepare the regex patterns
for %Y and %y (these two still match, respectively, only four or
two digits, exactly).
Note that this helper is intended to be used to prepare only the
regex patterns for the `%c` and `%x` format codes (and *not* for
`%y`, `%Y` or `%G`).

"""
pattern = self.pattern(format)
Expand Down