title: How to properly use python's isinstance() to check if a variable is a number?
body: <p>I found some old Python code that was doing something like:</p>
  
  <pre><code>if type(var) is type(1):
     ...
  </code></pre>
  
  <p>As expected, <code>pep8</code> complains about this recommending usage of <code>isinstance()</code>.</p>
  
  <p>Now, the problem is that the <code>numbers</code> module was added in Python 2.6 and I need to write code that works with Python 2.5+</p>
  
  <p>So <code>if isinstance(var, Numbers.number)</code> is not a solution. </p>
  
  <p>Which would be the proper solution in this case? </p>