From 6e372d1422dfaf5b1cd2ab2f48a42ee609cc119c Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Sat, 27 Aug 2005 19:25:59 +0000 Subject: [PATCH] fix bug where str.find() was being misused where __contains__ should have been used. --- Lib/_strptime.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/_strptime.py b/Lib/_strptime.py index a6b54f3a9da..aa02ba12c83 100644 --- a/Lib/_strptime.py +++ b/Lib/_strptime.py @@ -148,7 +148,7 @@ def __calc_date_time(self): if old: current_format = current_format.replace(old, new) time_tuple = time.struct_time((1999,1,3,1,1,1,6,3,0)) - if time.strftime(directive, time_tuple).find('00'): + if '00' in time.strftime(directive, time_tuple): U_W = '%U' else: U_W = '%W'