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 _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com