Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8dc25ad

Browse files
committed
Fix comments.
1 parent 8abcc5d commit 8dc25ad

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

Lib/_strptime.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,9 +298,12 @@ def strptime(data_string, format="%a %b %d %H:%M:%S %Y"):
298298
month = day = 1
299299
hour = minute = second = 0
300300
tz = -1
301+
# Default to -1 to signify that values not known; not critical to have,
302+
# though
301303
week_of_year = -1
302304
week_of_year_start = -1
303-
# weekday and julian defaulted to -1 so as to signal need to calculate values
305+
# weekday and julian defaulted to -1 so as to signal need to calculate
306+
# values
304307
weekday = julian = -1
305308
found_dict = found.groupdict()
306309
for group_key in found_dict.iterkeys():
@@ -388,7 +391,6 @@ def strptime(data_string, format="%a %b %d %H:%M:%S %Y"):
388391
# If we know the week of the year and what day of that week, we can figure
389392
# out the Julian day of the year
390393
# Calculations below assume 0 is a Monday
391-
# XXX only works for W
392394
if julian == -1 and week_of_year != -1 and weekday != -1 and year != -1:
393395
# Adjust for U directive so that calculations are not dependent on
394396
# directive used to figure out week of year

0 commit comments

Comments
 (0)