[Python-checkins] python/dist/src/Lib _strptime.py,1.38,1.39
bcannon@users.sourceforge.net
bcannon at users.sourceforge.net
Sat Aug 27 21:26:09 CEST 2005
Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4749/Lib
Modified Files:
_strptime.py
Log Message:
fix bug where str.find() was being misused where __contains__ should have been
used.
Index: _strptime.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/_strptime.py,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- _strptime.py 28 Oct 2004 04:49:19 -0000 1.38
+++ _strptime.py 27 Aug 2005 19:25:59 -0000 1.39
@@ -148,7 +148,7 @@
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'
More information about the Python-checkins
mailing list