<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: You know you need to install a new Python version when&#8230;</title>
	<atom:link href="http://www.algorithm.co.il/blogs/programming/python/you-know-you-need-to-install-a-new-python-version-when/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.algorithm.co.il/blogs/programming/you-know-you-need-to-install-a-new-python-version-when/</link>
	<description>Algorithms, for the heck of it</description>
	<lastBuildDate>Tue, 21 Jun 2011 21:07:08 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
	<item>
		<title>By: lorg</title>
		<link>http://www.algorithm.co.il/blogs/programming/you-know-you-need-to-install-a-new-python-version-when/#comment-177</link>
		<dc:creator>lorg</dc:creator>
		<pubDate>Tue, 17 Mar 2009 19:13:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.algorithm.co.il/blogs/?p=204#comment-177</guid>
		<description>It seems &lt;a href=&quot;http://bugs.python.org/issue2531&quot; rel=&quot;nofollow&quot;&gt;Issue 2531&lt;/a&gt; references this bug. I don&#039;t think it should have been rejected, as this behavior is problematic, and was also &quot;declared incorrect&quot; in Python 3.</description>
		<content:encoded><![CDATA[<p>It seems <a href="http://bugs.python.org/issue2531" rel="nofollow">Issue 2531</a> references this bug. I don&#8217;t think it should have been rejected, as this behavior is problematic, and was also &#8220;declared incorrect&#8221; in Python 3.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://www.algorithm.co.il/blogs/programming/you-know-you-need-to-install-a-new-python-version-when/#comment-176</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Wed, 11 Mar 2009 12:59:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.algorithm.co.il/blogs/?p=204#comment-176</guid>
		<description>Small typo in the above:

float(decimal.Decimal(&#039;0.2&#039;) &lt; 0.3)

Should be:

float(decimal.Decimal(&#039;0.2&#039;)) &lt; 0.3</description>
		<content:encoded><![CDATA[<p>Small typo in the above:</p>
<p>float(decimal.Decimal(&#8217;0.2&#8242;) &lt; 0.3)</p>
<p>Should be:</p>
<p>float(decimal.Decimal(&#8217;0.2&#8242;)) &lt; 0.3</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://www.algorithm.co.il/blogs/programming/you-know-you-need-to-install-a-new-python-version-when/#comment-175</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Wed, 11 Mar 2009 12:57:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.algorithm.co.il/blogs/?p=204#comment-175</guid>
		<description>This is indeed a pain. The fix is to do:


 float(decimal.Decimal(&#039;0.2&#039;) &lt; 0.3)


Obviously this isn&#039;t ideal though. The reasons for this are down to the differences precision in  floats and decimals. There&#039;s an explanation for it in this patch for python 3000:

http://mail.python.org/pipermail/python-3000-checkins/2008-November/004843.html

&quot;Comparison of objects of the differing types depends on whether either
of the types provide explicit support for the comparison.  Most numberic types
can be compared with one another, but comparisons of :class:`float` and
:class:`Decimal` are not supported to avoid the inevitable confusion arising
from representation issues such as ``float(&#039;1.1&#039;)`` being inexactly represented
and therefore not exactly equal to ``Decimal(&#039;1.1&#039;)`` which is.  When
cross-type comparison is not supported, the comparison method returns
``NotImplemented``.  This can create the illusion of non-transitivity between
supported cross-type comparisons and unsupported comparisons.  For example,
``Decimal(2) == 2`` and `2 == float(2)`` but ``Decimal(2) != float(2)``.&quot;</description>
		<content:encoded><![CDATA[<p>This is indeed a pain. The fix is to do:</p>
<p> float(decimal.Decimal(&#8217;0.2&#8242;) &lt; 0.3)</p>
<p>Obviously this isn&#8217;t ideal though. The reasons for this are down to the differences precision in  floats and decimals. There&#8217;s an explanation for it in this patch for python 3000:</p>
<p><a href="http://mail.python.org/pipermail/python-3000-checkins/2008-November/004843.html" rel="nofollow">http://mail.python.org/pipermail/python-3000-checkins/2008-November/004843.html</a></p>
<p>&#8220;Comparison of objects of the differing types depends on whether either<br />
of the types provide explicit support for the comparison.  Most numberic types<br />
can be compared with one another, but comparisons of :class:`float` and<br />
:class:`Decimal` are not supported to avoid the inevitable confusion arising<br />
from representation issues such as &#8220;float(&#8217;1.1&#8242;)&#8220; being inexactly represented<br />
and therefore not exactly equal to &#8220;Decimal(&#8217;1.1&#8242;)&#8220; which is.  When<br />
cross-type comparison is not supported, the comparison method returns<br />
&#8220;NotImplemented&#8220;.  This can create the illusion of non-transitivity between<br />
supported cross-type comparisons and unsupported comparisons.  For example,<br />
&#8220;Decimal(2) == 2&#8220; and `2 == float(2)&#8220; but &#8220;Decimal(2) != float(2)&#8220;.&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Arkon</title>
		<link>http://www.algorithm.co.il/blogs/programming/you-know-you-need-to-install-a-new-python-version-when/#comment-174</link>
		<dc:creator>Arkon</dc:creator>
		<pubDate>Wed, 11 Mar 2009 12:48:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.algorithm.co.il/blogs/?p=204#comment-174</guid>
		<description>It doesn&#039;t have anything todo with that issue.
I am really dumbstruck how they released a module with such bugs.
I suggest you to install python on a clean machine and check it out again.</description>
		<content:encoded><![CDATA[<p>It doesn&#8217;t have anything todo with that issue.<br />
I am really dumbstruck how they released a module with such bugs.<br />
I suggest you to install python on a clean machine and check it out again.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

