<div dir="ltr">I vote to copy Ruby's %N and leave %f alone.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 16, 2014 at 11:08 AM, Skip Montanaro <span dir="ltr"><<a href="mailto:skip.montanaro@gmail.com" target="_blank">skip.montanaro@gmail.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span class=""><br>On Tue, Dec 16, 2014 at 11:10 AM, matthieu bec <<a href="mailto:mbec@gmto.org" target="_blank">mbec@gmto.org</a>> wrote:<br>> Agreed with Antoine, strftime/strptime are somewhat different concerns.<br>> Doesn't mean thay cannot be fixed at the same time but it's a bit a<br>> separate.<br><br></span>Which reminds me... Somewhere else (maybe elsewhere in this thread? maybe on a bug tracker issue?) someone mentioned that Ruby uses %N for fractions of a second (and %L specifically for milliseconds). Here's the bit from the Ruby strftime doc:<br><br><font face="monospace">%L - Millisecond of the second (000..999)<br>%N - Fractional seconds digits, default is 9 digits (nanosecond)<br> %3N millisecond (3 digits)<br> %6N microsecond (6 digits)<br> %9N nanosecond (9 digits)<br> %12N picosecond (12 digits)<br></font><br>There's no obvious reason I can see to reinvent this particular wheel, at least the %N spoke. The only question might be whether to modify Python's existing %f format to accept a precision (defaulting to 6), or add %N in a manner similar (or identical) to Ruby's semantics.<span class="HOEnZb"><font color="#888888"><br><div><br></div><div>Skip</div></font></span></div>
<br>_______________________________________________<br>
Python-Dev mailing list<br>
<a href="mailto:Python-Dev@python.org">Python-Dev@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-dev" target="_blank">https://mail.python.org/mailman/listinfo/python-dev</a><br>
Unsubscribe: <a href="https://mail.python.org/mailman/options/python-dev/guido%40python.org" target="_blank">https://mail.python.org/mailman/options/python-dev/guido%40python.org</a><br>
<br></blockquote></div><br clear="all"><br>-- <br><div class="gmail_signature">--Guido van Rossum (<a href="http://python.org/~guido">python.org/~guido</a>)</div>
</div>