Turn off ZeroDivisionError?

Neal Becker ndbecker2 at gmail.com
Sun Feb 10 16:19:29 EST 2008


endangeredmassa at gmail.com wrote:

> Would a wrapper function be out of the question here?
> 
> def MyDivision(num, denom):
>     if denom==0:
>         return "NaN"
>     else
>         return num / denom

I bought a processor that has hardware to implement this.  Why do I want
software to waste time on it?




More information about the Python-list mailing list