From 652a0eb6d1687fb1012b97432744447f1c7cac3f Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Fri, 6 Dec 2024 18:17:32 +0100 Subject: [PATCH] =?utf8?q?[3.13]=20gh-127552:=20Remove=20comment=20questio?= =?utf8?q?ning=204-digit=20restriction=20for=20=E2=80=98Y=E2=80=99=20in=20?= =?utf8?q?datetime.strptime=20patterns=20(GH-127590)=20GH-127650)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit gh-127552: Remove comment questioning 4-digit restriction for ‘Y’ in datetime.strptime patterns (GH-127590) The code has required 4 digits for the year since its inclusion in the stdlib in 2002 (over 22 years ago as of this commit). (cherry picked from commit 51cfa569e379f84b3418db0971a71b1ef575a42b) Co-authored-by: Beomsoo Kim --- Lib/_strptime.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/Lib/_strptime.py b/Lib/_strptime.py index 4c68a6a88e5b..8d763e5bd331 100644 --- a/Lib/_strptime.py +++ b/Lib/_strptime.py @@ -301,8 +301,6 @@ class TimeRE(dict): 'V': r"(?P5[0-3]|0[1-9]|[1-4]\d|\d)", # W is set below by using 'U' 'y': r"(?P\d\d)", - #XXX: Does 'Y' need to worry about having less or more than - # 4 digits? 'Y': r"(?P\d\d\d\d)", 'z': r"(?P[+-]\d\d:?[0-5]\d(:?[0-5]\d(\.\d{1,6})?)?|(?-i:Z))", 'A': self.__seqToRE(self.locale_time.f_weekday, 'A'), -- 2.47.3