Skip to content

Commit 51cfa56

Browse files
authored
gh-127552: Remove comment questioning 4-digit restriction for ‘Y’ in datetime.strptime patterns (#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).
1 parent 6bc3e83 commit 51cfa56

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

Lib/_strptime.py

-2
Original file line numberDiff line numberDiff line change
@@ -301,8 +301,6 @@ def __init__(self, locale_time=None):
301301
'V': r"(?P<V>5[0-3]|0[1-9]|[1-4]\d|\d)",
302302
# W is set below by using 'U'
303303
'y': r"(?P<y>\d\d)",
304-
#XXX: Does 'Y' need to worry about having less or more than
305-
# 4 digits?
306304
'Y': r"(?P<Y>\d\d\d\d)",
307305
'z': r"(?P<z>[+-]\d\d:?[0-5]\d(:?[0-5]\d(\.\d{1,6})?)?|(?-i:Z))",
308306
'A': self.__seqToRE(self.locale_time.f_weekday, 'A'),

0 commit comments

Comments
 (0)