title: How to get NaN when I divide by zero
body: <p>When I do floating point division in Python, if I divide by zero, I get an exception:</p>
  
  <pre><code>&gt;&gt;&gt; 1.0/0.0
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  ZeroDivisionError: float division
  </code></pre>
  
  <p>I'd really like to get <code>NaN</code> or <code>Inf</code> instead (because the <code>NaN</code> or <code>Inf</code> will propagate through the rest of my calculation correctly and not kill my program).</p>
  
  <p>How can I do this?</p>