First time here? Check out the FAQ!
answered 2011-10-01 13:40:41 +0100
So, it seems that in many situations we have to code if isinstance (n, (int, Integer)) instead of if isinstance (n, Integer), despite the fact that the latter is much more natural. Sigh.
if isinstance (n, (int, Integer))
if isinstance (n, Integer)