Brent,<div><br></div><div>The rules changed after one day.  Now, I can use exception again.  </div><div>Off topics: if python have command alias, I can say &#39;alias error raise&#39;</div><div><br></div><div>-Nick<br><br>
<div class="gmail_quote">On Wed, Oct 6, 2010 at 2:28 PM, Brent Tubbs <span dir="ltr">&lt;<a href="mailto:brent.tubbs@gmail.com">brent.tubbs@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Nick: Is your boss likely to notice something like this?<br>
<br>
(except.py)<br>
class TotallyNotAnExceptionNothingToSeeHere(Exception):<br>
    pass<br>
<br>
raise TotallyNotAnExceptionNothingToSeeHere(&quot;Really, pay me no attention&quot;)<br>
<br>
brent@greta:~/tmp$ python except.py<br>
Traceback (most recent call last):<br>
  File &quot;except.py&quot;, line 4, in &lt;module&gt;<br>
    raise TotallyNotAnExceptionNothingToSeeHere(&quot;Really, pay me no attention&quot;)<br>
__main__.TotallyNotAnExceptionNothingToSeeHere: Really, pay me no attention<br>
<br>
Kidding.... mostly.  The &quot;no exceptions&quot; rule just seems really arbitrary.<br>
<font color="#888888"><br>
Brent<br>
</font><div><div></div><div class="h5"><br>
On Wed, Oct 6, 2010 at 8:01 AM, Andrew Dalke &lt;<a href="mailto:dalke@dalkescientific.com">dalke@dalkescientific.com</a>&gt; wrote:<br>
&gt; On Oct 5, 2010, at 9:57 PM, James Tatum wrote:<br>
&gt;&gt; I&#39;ve seen this anti-pattern up close. There is no Pythonic answer -<br>
&gt;&gt; exceptions are the answer.<br>
&gt;<br>
&gt; There is a Pythonic answer - you can go the Twisted route.<br>
&gt; (Excepting those who think Twisted isn&#39;t Pythonic. ;)<br>
&gt;<br>
&gt; Twisted&#39;s Deferreds can&#39;t use the stack because they<br>
&gt; implement continuations through callback methods. You<br>
&gt; &quot;addCallback&quot; for the normal case and &quot;addErrback&quot; for the<br>
&gt; exceptions.<br>
&gt;<br>
&gt; It&#39;s possible to develop your entire code base this way.<br>
&gt;<br>
&gt; It&#39;s going to be structured entirely different than what<br>
&gt; the OP&#39;s more senior rule mandator expects, but that might<br>
&gt; be a good thing here.<br>
&gt;<br>
&gt;<br>
&gt;                                Andrew<br>
&gt;                                <a href="mailto:dalke@dalkescientific.com">dalke@dalkescientific.com</a><br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Baypiggies mailing list<br>
&gt; <a href="mailto:Baypiggies@python.org">Baypiggies@python.org</a><br>
&gt; To change your subscription options or unsubscribe:<br>
&gt; <a href="http://mail.python.org/mailman/listinfo/baypiggies" target="_blank">http://mail.python.org/mailman/listinfo/baypiggies</a><br>
&gt;<br>
_______________________________________________<br>
Baypiggies mailing list<br>
<a href="mailto:Baypiggies@python.org">Baypiggies@python.org</a><br>
To change your subscription options or unsubscribe:<br>
<a href="http://mail.python.org/mailman/listinfo/baypiggies" target="_blank">http://mail.python.org/mailman/listinfo/baypiggies</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>-Nick Kanakakorn<br>
</div>