<?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: Using exception or assertation</title>
	<atom:link href="http://blog.affien.com/archives/2005/02/28/using-exception-or-assertation/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.affien.com/archives/2005/02/28/using-exception-or-assertation/</link>
	<description>A few thoughts</description>
	<lastBuildDate>Tue, 02 Mar 2010 14:24:18 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Bas Westerbaan</title>
		<link>http://blog.affien.com/archives/2005/02/28/using-exception-or-assertation/comment-page-1/#comment-198</link>
		<dc:creator>Bas Westerbaan</dc:creator>
		<pubDate>Fri, 04 Mar 2005 16:12:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.w-nz.com/archives/2005/02/28/using-exception-or-assertation/#comment-198</guid>
		<description>Assertations are used in debugging for they only should be called when there is some programatical error in the architecture while programming (programmer&#039;s fault, not system or user&#039;s or environment&#039;s). But this doens&#039;t limit them to debugging. In some cases where a programmer finds a certain assertation so important that he keeps it there.</description>
		<content:encoded><![CDATA[<p>Assertations are used in debugging for they only should be called when there is some programatical error in the architecture while programming (programmer&#8217;s fault, not system or user&#8217;s or environment&#8217;s). But this doens&#8217;t limit them to debugging. In some cases where a programmer finds a certain assertation so important that he keeps it there.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Noud</title>
		<link>http://blog.affien.com/archives/2005/02/28/using-exception-or-assertation/comment-page-1/#comment-196</link>
		<dc:creator>Noud</dc:creator>
		<pubDate>Fri, 04 Mar 2005 07:35:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.w-nz.com/archives/2005/02/28/using-exception-or-assertation/#comment-196</guid>
		<description>To be quite more exact. Assert ought to be used for debugging, assert values should be right, if they aren&#039;t the program contains a bug and will fail. When finalise the program there should be no assert in the code. I thought.</description>
		<content:encoded><![CDATA[<p>To be quite more exact. Assert ought to be used for debugging, assert values should be right, if they aren&#8217;t the program contains a bug and will fail. When finalise the program there should be no assert in the code. I thought.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bas Westerbaan</title>
		<link>http://blog.affien.com/archives/2005/02/28/using-exception-or-assertation/comment-page-1/#comment-175</link>
		<dc:creator>Bas Westerbaan</dc:creator>
		<pubDate>Tue, 01 Mar 2005 14:19:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.w-nz.com/archives/2005/02/28/using-exception-or-assertation/#comment-175</guid>
		<description>Python allows the use of exceptions as they are meant to be used.
In most other languages exceptions are *very* slow and therefore there are usualy test functions which have to be used instead of catching exceptions which I think is a shame.

For instance Int.Parse in .net throws an exception when it can&#039;t be parsed.. throwing exceptions takes time.
Int.TryParse doesn&#039;t throw an exception when parsing fails but just returns false, so that one has to be used whether you like it or not.</description>
		<content:encoded><![CDATA[<p>Python allows the use of exceptions as they are meant to be used.<br />
In most other languages exceptions are *very* slow and therefore there are usualy test functions which have to be used instead of catching exceptions which I think is a shame.</p>
<p>For instance Int.Parse in .net throws an exception when it can&#8217;t be parsed.. throwing exceptions takes time.<br />
Int.TryParse doesn&#8217;t throw an exception when parsing fails but just returns false, so that one has to be used whether you like it or not.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gumuz</title>
		<link>http://blog.affien.com/archives/2005/02/28/using-exception-or-assertation/comment-page-1/#comment-174</link>
		<dc:creator>Gumuz</dc:creator>
		<pubDate>Mon, 28 Feb 2005 23:00:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.w-nz.com/archives/2005/02/28/using-exception-or-assertation/#comment-174</guid>
		<description>Well said. Python lives by this &#039;exception =! error&#039; rule. It&#039;s a common idiom called (i think): &#039;ask forgiveness instead of permission&#039; as in:

try:
  i = list[2]
except IndexError:
  i = 0

if the list doesnt contain the required item, it uses a default. no harm done.</description>
		<content:encoded><![CDATA[<p>Well said. Python lives by this &#8216;exception =! error&#8217; rule. It&#8217;s a common idiom called (i think): &#8216;ask forgiveness instead of permission&#8217; as in:</p>
<p>try:<br />
  i = list[2]<br />
except IndexError:<br />
  i = 0</p>
<p>if the list doesnt contain the required item, it uses a default. no harm done.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
