title: How is the None keyword argument converted into a int datatype?
body: <p>Disclaimer: This is not my code. It originated from <a href="http://mcsp.wartburg.edu/zelle/python/graphics.py" rel="nofollow noreferrer">graphics.py</a> created by Dr. John Zelle. </p>
  
  <p>Where is <code>rate</code> declared as a number? I understand that it is a keyword argument of type <code>None</code>, but how is this <code>pauselength = 1/rate-(now-_update_lasttime)</code> valid? To my knowledge, this is saying that <code>1</code> is divisible by <code>None</code>.</p>
  
  <pre class="lang-py prettyprint-override"><code>import time, os, sys
  
  try:  # import as appropriate for 2.x vs. 3.x
     import tkinter as tk
  except:
     import Tkinter as tk
  
  # global variables and functions
  
  _root = tk.Tk()
  _root.withdraw()
  
  _update_lasttime = time.time()
  
  def update(rate=None):
      global _update_lasttime
      if rate:
          now = time.time()
          pauseLength = 1/rate-(now-_update_lasttime)
          if pauseLength &gt; 0:
              time.sleep(pauseLength)
              _update_lasttime = now + pauseLength
          else:
              _update_lasttime = now
  
      _root.update()
  </code></pre>
  
  <p>A simple experiment:</p>
  
  <pre class="lang-py prettyprint-override"><code>a = None
  b = 1
  print(b/a)
  </code></pre>
  
  <p>Reveals the following error (Which makes complete sense):</p>
  
  <pre class="lang-py prettyprint-override"><code>TypeError: unsupported operand type(s) for /: 'int' and 'NoneType'
  </code></pre>