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 'alias error raise'</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"><<a href="mailto:brent.tubbs@gmail.com">brent.tubbs@gmail.com</a>></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("Really, pay me no attention")<br>
<br>
brent@greta:~/tmp$ python except.py<br>
Traceback (most recent call last):<br>
File "except.py", line 4, in <module><br>
raise TotallyNotAnExceptionNothingToSeeHere("Really, pay me no attention")<br>
__main__.TotallyNotAnExceptionNothingToSeeHere: Really, pay me no attention<br>
<br>
Kidding.... mostly. The "no exceptions" 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 <<a href="mailto:dalke@dalkescientific.com">dalke@dalkescientific.com</a>> wrote:<br>
> On Oct 5, 2010, at 9:57 PM, James Tatum wrote:<br>
>> I've seen this anti-pattern up close. There is no Pythonic answer -<br>
>> exceptions are the answer.<br>
><br>
> There is a Pythonic answer - you can go the Twisted route.<br>
> (Excepting those who think Twisted isn't Pythonic. ;)<br>
><br>
> Twisted's Deferreds can't use the stack because they<br>
> implement continuations through callback methods. You<br>
> "addCallback" for the normal case and "addErrback" for the<br>
> exceptions.<br>
><br>
> It's possible to develop your entire code base this way.<br>
><br>
> It's going to be structured entirely different than what<br>
> the OP's more senior rule mandator expects, but that might<br>
> be a good thing here.<br>
><br>
><br>
> Andrew<br>
> <a href="mailto:dalke@dalkescientific.com">dalke@dalkescientific.com</a><br>
><br>
><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>
><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>