<p>Nick mentioned using a single type and converting upon return, I'm starting to like that more. A limited set of time formats is mostly arbitrary, and there will always be a performance hit deciding which type to return.</p>
<p>The goal here is to allow high precision timings with minimal cost. A separate module, and an agreement on what the best performing high precision type is I think is the best way forward. </p>
<div class="gmail_quote">On Feb 1, 2012 8:47 AM, "Victor Stinner" <<a href="mailto:victor.stinner@haypocalc.com">victor.stinner@haypocalc.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
> (I removed the timespec format, I consider that we don't need it.)<br>
><br>
> Rather, I guess you removed it because it didn't fit the "types as flags"<br>
> pattern.<br>
<br>
I removed it because I don't like tuple: you cannot do arithmetic on<br>
tuple, like t2-t1. Print a tuple doesn't give you a nice output. It is<br>
used in C because you have no other choice, but in Python, we can do<br>
better.<br>
<br>
> As I said in another message, another hint that this is the wrong API design:<br>
> Will the APIs ever support passing in types other than these five? Probably<br>
> not, so I strongly believe they should not be passed in as types.<br>
<br>
I don't know if we should only support 3 types today, or more, but I<br>
suppose that we will add more later (e.g. if datetime is replaced by<br>
another new and better datetime module).<br>
<br>
You mean that we should use a string instead of type, so<br>
time.time(format="decimal")? Or do something else?<br>
<br>
Victor<br>
_______________________________________________<br>
Python-Dev mailing list<br>
<a href="mailto:Python-Dev@python.org">Python-Dev@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/python-dev" target="_blank">http://mail.python.org/mailman/listinfo/python-dev</a><br>
Unsubscribe: <a href="http://mail.python.org/mailman/options/python-dev/anacrolix%40gmail.com" target="_blank">http://mail.python.org/mailman/options/python-dev/anacrolix%40gmail.com</a><br>
</blockquote></div>