
Dec. 11, 2014
2 p.m.
On 2014-12-11 18:33, Skip Montanaro wrote:
On Thu, Dec 11, 2014 at 11:58 AM, Matthieu Bec <mdcb808@gmail.com> 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.
Could the number of digits be specified? You could have "%9f" for nanoseconds, "%3f" for milliseconds, etc. The default would be 6 microseconds for backwards compatibility. Maybe, also, strptime could support "%*f" to gobble as many digits as are available.