Index: Lib/_strptime.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/_strptime.py,v retrieving revision 1.32 diff -c -r1.32 _strptime.py *** Lib/_strptime.py 4 May 2004 09:21:43 -0000 1.32 --- Lib/_strptime.py 10 Aug 2004 18:53:23 -0000 *************** *** 195,200 **** --- 195,202 ---- 'm': r"(?P1[0-2]|0[1-9]|[1-9])", 'M': r"(?P[0-5]\d|\d)", 'S': r"(?P6[0-1]|[0-5]\d|\d)", + # fractional seconds as emitted by the logging package + 's': r"(?P(6[0-1]|[0-5]\d),\d{3,3})", 'U': r"(?P5[0-3]|[0-4]\d|\d)", 'w': r"(?P[0-6])", # W is set below by using 'U' *************** *** 342,347 **** --- 344,351 ---- minute = int(found_dict['M']) elif group_key == 'S': second = int(found_dict['S']) + elif group_key == 's': + second = float(found_dict['s'].replace(",", ".")) elif group_key == 'A': weekday = locale_time.f_weekday.index(found_dict['A'].lower()) elif group_key == 'a': Index: Lib/test/test_strptime.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_strptime.py,v retrieving revision 1.24 diff -c -r1.24 test_strptime.py *** Lib/test/test_strptime.py 16 Nov 2003 16:17:48 -0000 1.24 --- Lib/test/test_strptime.py 10 Aug 2004 18:53:23 -0000 *************** *** 240,245 **** --- 240,248 ---- # Test second directives self.helper('S', 5) + def test_log_second(self): + self.assertEqual(23.145, _strptime.strptime("23,145", "%s")[5]) + def test_weekday(self): # Test weekday directives for directive in ('A', 'a', 'w'):