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

Skip to content

Commit 6e372d1

Browse files
committed
fix bug where str.find() was being misused where __contains__ should have been
used.
1 parent 0738206 commit 6e372d1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/_strptime.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def __calc_date_time(self):
148148
if old:
149149
current_format = current_format.replace(old, new)
150150
time_tuple = time.struct_time((1999,1,3,1,1,1,6,3,0))
151-
if time.strftime(directive, time_tuple).find('00'):
151+
if '00' in time.strftime(directive, time_tuple):
152152
U_W = '%U'
153153
else:
154154
U_W = '%W'

0 commit comments

Comments
 (0)