Skip> I would like to see an analog to %S which preserves fractions of a Skip> second as the default formatting for time and datetime objects Skip> does:
Skip> >>> print(now) Skip> 2007-09-10 22:07:53.654774 Guido> Right. It's odd that there's nothing explicit that exactly Guido> produces the default. (Though floats have this issue too -- I Guido> wish it could be fixed there too.) Looking at the libref doc for time.strftime and the strftime(3) man pages on Solaris 10, Mac OS X and CentOS 4, I see that %f is unused ("f" is mnemonic for "fractions" of a second). Maybe after a little more investigation and not endless amounts of discussion this could be added to Python as the way to represent the fractions of seconds as an int representing microseconds. For example, the above example could be specified by %Y-%m-%d %H:%M:%S.%f Thinking about future advances in timekeeping, is microseconds too short? Maybe "%N" for "nanoseconds"? Skip _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com