I think strftime / strptime support is a low-priority concern on this topic, and can probably be discussed independently of the core nanosecond support.
On Thu, 11 Dec 2014 11:14:27 -0800 Guido van Rossum firstname.lastname@example.org wrote:
Another issue to consider here is that parsing and printing should be symmetrical. The %f format gobbles up exactly 6 digits.
Finally, strptime and strftime are not invented by Python, the same functions with (mostly) the same format characters are defined by other languages. Is there not a single other language that has added support for nanoseconds to its strftime/strptime? (I wouldn't be surprised if there wasn't -- while computer clocks have a precision in nanoseconds, that doesn't mean they are that *accurate* at all (even with ntpd running).
On Thu, Dec 11, 2014 at 10:33 AM, Skip Montanaro email@example.com wrote:
On Thu, Dec 11, 2014 at 11:58 AM, Matthieu Bec firstname.lastname@example.org wrote:
...or keep using "%f" if acceptable...
That might be a problem. While it will probably work most of the time, there are likely to be situations where the caller assumes it generates a six-digit string. I did a little poking around. It seems like "%N" isn't used.
Skip _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/guido%40python.org