<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Apr 8, 2016 at 11:24 AM,  <span dir="ltr"><<a href="mailto:rian@thelig.ht" target="_blank">rian@thelig.ht</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">AssertionError is *always* indicative of a bug </blockquote></blockquote></blockquote><div><br></div><div>I don't think there is any way to know that -- it all depends on how it's used. For my part, Assertions are only for testing -- and are actually turned off in debug mode.</div><div><br></div><div>And I think we can say the same thing about ALL Exceptions --even a syntax error may not be a "stop everything" error in a system that runs user-written scripts.</div><div><br></div><div>I agree with Chris A's point:</div><div><br></div><div>Any unhandled Exception is a bug. Simple as that.</div><div><br></div><div>Any other interpretation would be a style issue, decided for your group/application.</div><div><br></div><div>And if you are going to go there, I would do:</div><div><br></div><div>if not_a_bug() instead.</div><div><br></div><div>Consistent with the principle of good Python code -- only handle the Exceptions you know to handle.</div><div><br></div><div>-CHB</div><div> <br></div></div>-- <br><div class="gmail_signature"><br>Christopher Barker, Ph.D.<br>Oceanographer<br><br>Emergency Response Division<br>NOAA/NOS/OR&R            (206) 526-6959   voice<br>7600 Sand Point Way NE   (206) 526-6329   fax<br>Seattle, WA  98115       (206) 526-6317   main reception<br><br><a href="mailto:Chris.Barker@noaa.gov" target="_blank">Chris.Barker@noaa.gov</a></div>
</div></div>