<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Sorry James,<div><br></div><div>I hit "Send" by mistake before I was finished correcting the cut-n-paste I did from a case where I only needed to protect against divisions by zero:</div><div><br></div><div>The code you need is actually</div><div><br></div><div><div><div><font class="Apple-style-span" face="Courier">try:</font></div><div><font class="Apple-style-span" face="Courier">&nbsp; &nbsp; division_by_zero = <a href="http://ext.is">ext.is</a>_division_by_zero_trapped()</font></div><div><font class="Apple-style-span" face="Courier">&nbsp; &nbsp; invalid = <a href="http://ext.is">ext.is</a>_invalid_trapped()</font></div><div><font class="Apple-style-span" face="Courier">&nbsp; &nbsp; overflow = <a href="http://ext.is">ext.is</a>_overflow_trapped()</font></div><div><font class="Apple-style-span" face="Courier">&nbsp; &nbsp; ext.trap_exceptions(division_by_zero=False,</font></div><div><font class="Apple-style-span" face="Courier">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; invalid=False,</font></div><div><font class="Apple-style-span" face="Courier">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; overflow=False)</font></div><div><font class="Apple-style-span" face="Courier">finally:</font></div><div><font class="Apple-style-span" face="Courier">&nbsp; &nbsp; ext.trap_exceptions(division_by_zero=division_by_zero,</font></div><div><font class="Apple-style-span" face="Courier">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; invalid=invalid,</font></div><div><font class="Apple-style-span" face="Courier">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; overflow=overflow)</font></div></div></div><div><br></div><div>Best wishes,</div><div><br></div><div>Luc</div><div><br></div></body></html>