title: Version agnotstic checking if a variable is an integer?
body: <p>In python 2.6 and 2.7 you use</p>
  
  <pre><code>isinstance(variable, (int, long))
  </code></pre>
  
  <p>In python 3x <a href="http://docs.python.org/3.3/whatsnew/3.0.html#integers" rel="nofollow">ints and longs are merged</a>. So you simply do </p>
  
  <pre><code>isinstance(variable, int)
  </code></pre>
  
  <p>Is there a clean version agnostic way of testing if a variable is an integer in python?</p>