title: Type-Checking in Functions between Python 2.7 and Python 3.3
body: <p>In my functions, I check for the types of the input so that it is valid (example - for a function that checks the primality of 'n', I don't want 'n' to be inputted as a string).
  The problem occurs with checking for <code>long</code>s and <code>int</code>s.
  In Python 3.3, they removed the <code>long</code>-type number, so the problem occurs with this:</p>
  
  <pre><code>def isPrime(n):
      """Checks if 'n' is prime"""
      if not isinstance(n, int): raise TypeError('n must be int')
      # rest of code
  </code></pre>
  
  <p>This works universally for both v2.7 and v3.3.
  However, if I import this function in a Python 2.7 program, and enter a <code>long</code>-type number for 'n', like this: <code>isPrime(123456789000)</code>, it would obviously raise a <code>TypeError</code> because 'n' is of the type <code>long</code>, not <code>int</code>.</p>
  
  <p>So, how can I check if it is valid input for both v2.7 and v3.3 for <code>long</code>s and <code>int</code>s? </p>
  
  <p>Thanks!</p>