14 Jan
2005
14 Jan
'05
12:24 p.m.
On Fri, 2005-01-14 at 09:36, Skip Montanaro wrote:
Actually, time.strptime() returns a struct_time object. Would it be possible to extend %S to parse floats then add a microseconds (or whatever) field to struct_time objects that is available by attribute only?
+1 for adding a microseconds field to struct_time, but I'd also like to see an integer-only way of parsing fractional seconds in time.strptime. Using floating point makes it harder to support exact comparison of timestamps (an issue I recently ran into when writing unit tests for code storing timestamps in a database). My vote is for %<digit>N producing a microseconds field. Mark Russell