A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/attachments/20120203/39038b05/attachment.html below:

<p> <br>
On Feb 3, 2012 2:59 AM, &quot;Barry Warsaw&quot; &lt;<a href="mailto:barry@python.org">barry@python.org</a>&gt; wrote:<br>
&gt;<br>
&gt; On Feb 02, 2012, at 11:07 PM, Nick Coghlan wrote:<br>
&gt;<br>
&gt; &gt;Yup, that&#39;s why your middle-ground approach didn&#39;t make any sense to<br>
&gt; &gt;me. Returning Decimal when a flag is set to request high precision<br>
&gt; &gt;values actually handles everything (since any epoch related questions<br>
&gt; &gt;only arise later when converting the decimal timestamp to an absolute<br>
&gt; &gt;time value).<br>
&gt;<br>
&gt; Guido really dislikes APIs where a flag changes the return type, and I agree<br>
&gt; with him.  It&#39;s because this is highly unreadable:<br>
&gt;<br>
&gt;    results = blah.whatever(True)<br>
&gt;<br>
&gt; What the heck does that `True` do?  It can be marginally better with a<br>
&gt; keyword-only argument, but not much.</p>
<p>Victor&#39;s patch passes in the return type rather than a binary flag, thus avoiding this particular problem. </p>
<p>&gt; I haven&#39;t read the whole thread so maybe this is a stupid question, but why<br>
&gt; can&#39;t we add a datetime-compatible higher precision type that hides all the<br>
&gt; implementation details? <br>
&gt;<br>
&gt; -Barry</p>
<p>It&#39;s not a stupid question, but for backwards compatibility, what we would actually need is a version of Decimal that implicitly interoperates with binary floats. That&#39;s... not trivial. </p>
<p>Cheers,<br>
Nick<br>
--<br>
Sent from my phone, thus the relative brevity :)</p>

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4